I’m making a dynamic admin panel with crud generator with the help of laravel and vue. I have a table where I’m loading data asynchronously from API. There is an is_featured column in my table which …
Tag: laravel
How to calculate the average of total ratings of 5 stars?
I’m trying to get the average rating of total star rating for one restaurant. The customers will rate this restaurant. I made a pivot table for storing customers ratings. The average rating =5 What is the formula or how can I calculate that in php laravel ? This is my code: Answer Don’t take all p…
How to editColumn on a relationship column in Laravel Yajra DataTables
I’m using Laravel 6 with Yajra Datatable. I’m creating a “SessionDataTable” on a Session Model. This model has a Patient relationship class Session extends Model { public function patient() …
How to install Maatwebsite/Laravel-Excel for laravel 5.4?
I’m working on a project with laravel 5.4. I’m editing an old project and adding some features. But I’m facing a problem with installing excel package that is suitable to this version. I think …
Linux scheduled task not working in Laravel
The below cronjob is not working, although the task itself is working when I manually run it using php artisan q:calc . I just added the path for php and artisan files as shown below, and pasted the …
How can i get the id of the user i just added in a store function() Larevel 6.0
I did a register of users in my own controller, i want the id of the user i just added because i want to use it in another table in that same controller and function Below i will let the code of how …
Laravel pass parameter to its distant relationship (translate children)
I have categories with id, parent_id, slug , pivot table category_language which columns are id,category_id,language_id,value As you can see I can translate parent category, but can’t send desired $…
PHP assign parent ids for children in array
I’am stuck on assigning pid’s (parent id’s) on 3rd element. I mean in setParent() if I return $array before call recursive function, then I see that “PC” and “Laptop” are having correct pid’s. If I …
Laravel 6 redirecting to https://www.example.com/index.php when I press enter in the address bar with an address of www.example.com/profile?
I would think others are having the same issue. I am on a shared server with Inmotion Hosting creating basic profile pages. When I put my cursor up in the address bar for example the url ‘https://…
connect laravel application with database based on the url
hi im using laravel 6 project i want to connect my application to database based on the url like this schema www.mywebsite.com/project1 www.mywebsite.com/project2 www.mywebsite.com/project3 www….