I have a products table and a product_pictures table, where a single product can have many pictures (one to many relationship). I am trying to display all of th
I have a products table and a product_pictures table, where a single product can have many pictures (one to many relationship). I am trying to display all of th
Is there a way that I can get the current database table in use by the model that I'm in? I see that there is a table() function in Laravel/Database/Eloquent/mo
When I want to define a custom sort order in a MySQL query I can do something like this: ORDER BY FIELD(language,'USD','EUR','JPN') What would be the Eloquen
I'm quite new to laravel and I'm trying to update a record from form's input. However I see that to update the record, first you need to fetch the record from d
I have a pivot table that connects users to workspaces. On the pivot table, I also have a column for role, which defines the users role for that workspace. Can
I want to remove all related child categories from parent categories. I think I need a recursive function to solve this. Here is my attempt: public function de
I have a Laravel collection and I want to modify one of its property value to negative integer. For this I am using the collection map method but it also modify
In my Laravel project, I use nwidart package for making modules. Now I want to add deleted_at column to an existing model. I should make a new migration in my m
I am using Eloquent together with Laravel 4's Pagination class. Problem: When there are some GET parameters in the URL, eg: http://site.com/users?gender=female
I just started playing with Laravel 4 and Eloquent. I have a blog table and lots of other related tables to it: blog <- main info about the blog record blog
I just started playing with Laravel 4 and Eloquent. I have a blog table and lots of other related tables to it: blog <- main info about the blog record blog