npm run watch build successfully and laravel mix but on browser can’t reached ERR_CONNECTION_REFUSED

When i am try to run on my laravel real time application with pusher: npm run watch the Compiled successfully and laravel mix build successfully but when i open Browser and try to reach url http://localhost:8000 or http://localhost:8001 or http://localhost:8079 or http://localhost:8080 all this port same error on browser i found ERR_CONNECTION_REFUSED on the Browser…

Laravel middleware sharing variable view does not work when writing HTTP test

We have the following middleware. We know the middleware works since testing the application in browser is working. Sadly when writing HTTP test case, blade is saying that the variable defined by the middleware is not there. <?php namespace App\Http\Middleware; use App\Repository\UserContract; use Closure; use Illuminate\Contracts\View\Factory as ViewFactory; use Illuminate\Support\Facades\View; class Authenticate { /** *…

Edit function not working in CRUD form (Laravel)

I’ve created a CRUD form called ‘Groups’. The Create and Delete functions work, but the ‘Edit’ throws up an error: “Undefined variable: group (View: C:\wamp64\www\sites\jointpromote2\resources\views\groups\edit.blade.php The error points to this line of code: <input type=”text” class=”form-control” name=”group_name” value=”<?php echo e($group->group_name); ?>” /> I’ve tried several things but nothing fixes the issue. Here is my http/controllers/GroupController.php…

Make modal pop-up when an items quantity in database is below a specific number like 5 in Laravel

I want my modal to pop-up in a blade when the quantity of a stock item is below a specific number like 5. I have the modal but I don’t know how to call/instantiate it. Help me please. https://laracasts.com/discuss/channels/laravel/models-views-controllers There wasn’t a solution in this dicussion, thats why I pleading for your assistance. Here is…

Edit function not working in CRUD form (Laravel)

I’ve created a CRUD form called ‘Groups’. The Create and Delete functions work, but the ‘Edit’ throws up an error: “Undefined variable: group (View: C:\wamp64\www\sites\jointpromote2\resources\views\groups\edit.blade.php The error points to this line of code: group_name); ?>” /> I’ve tried several things but nothing fixes the issue. Here is my http/controllers/GroupController.php { $event = Group::find($id); return view(‘groups.edit’,…

how can compress the uploaded image, convert into base 64 and directly store in database using laravel

I want to compress the uploaded image and store the base64 of the image in the database. Every time I google the question i always gets the idea to use the image stored in a certain path. I have using intervention/image package I have tried these code $img = Image::make($request->photo)->resize(300, 200); //get the extension $type…