Skip to content
Advertisement

Tag: laravel-7

How to use multiple whereBetween to sum two different record

I need to compare and sum data from two different date. Assuming i have 4 input dates Currently, my query only able to get one whereBetween date data as below Current Code Current result from startdate and enddate Example another result from compare_startdate and compare_enddate How to query another result from compare_startdate to compare_enddate in order to sum result of

How to access assets from resources sub folder in Laravel?

This is the javascript source in blade file. OR Both asset and URL::to doesn’t work. The actual file path is: resources -> views -> template -> js error shows 404 not found on local xampp server. its working fine in production. project is copy of production code. I would appreciate for your kind support. thanks Answer Static assets are usually

Convert a json to multi-dimensional PHP array

I have the following json sent to my API endpoint {“key”:”levels”,”value”:”[{role_id:1, access_level_id:3}, {role_id:2, access_level_id:1}, {role_id:3, access_level_id:2}]”,”description”:””} at the backend, I receive it as a Laravel request as follows: And it returns the following expected result array ( ‘key’ => ‘levels’, ‘value’ => ‘[{role_id:1, access_level_id:3}, {role_id:2, access_level_id:1}, {role_id:3, access_level_id:2}]’, ‘description’ => NULL, ) But I need to convert the ‘value’ to

Not found route in Laravel 7

Making a website on Laravel 7.28. Added a route to ‘routes/web.php’: The controller is created in ‘appHttpControllersLKIndexController.php’. It has a method: Created promoter file ‘resourcesviewslkindex.blade.php’. When I’m trying to follow the route http://127.0.0.1:8000/lk. I get an error: The requested resource /lk was not found on this server. If I change the ‘lk’ routes to the ‘account’, for example, then at

Advertisement