Can someone give me an example of how to save elements with this relationship? Currently I have Prod...
Hi, I want to have sql query like this: SELECT * FROM "public".user inner join ( SELE...
Hey folks, There are times when heavy model customization is required, and I want to access data wit...
I have a problem with paginate() with hasmany(). I have 2 tables. Categories and posts. I showing po...
I have a table named attendance and another named students_attendance. I add an attendance record to...
i've been able to construct a join and it works: $projects = Main::join('builds', 'mains.build_id',...
Hi, how I hidden column on many to many relationships? Square.php public function sitesquares() { //...
Hi, I am trying to create a beautiful API. Lets assume we have 2 tables, relationship one-to-many (a...
There are two ways to create new record in laravel $model = new MyModel; $model->field1 = 'value1...
Hi guys! I have a posts table and a post may have one media. It can be a video or a gallery. This is...
Hi, I have a boolean column in table. I have also added that field in $fillable in modal class. When...
I was wondering if there is any good way to treat table data as form input data. That's probably cle...
Hi folks, I'm having problems with filtering related objects: 2 Tables: customers and bills A custom...
Hi guys! I have a posts table having these fields id content post_type media_id postable_type The...
I want change password column length 32 to 60 Why this is not work, if (Schema::hasColumn('users', '...
Hi all, I have a User model that hasMany Assessments so: class User...{ public function assessment()...
How do i make eloquent: NOT assume that my primary key is only named 'id' set the $timestamps prope...
id item_id tag_id 244 25090 28 247 25091 28 249 25091 33 250 25092 28 251 25092 33 253...
Hi, We have a requirement in our application wherein we need to capture all instance of update opera...
DB::table('users') ->join('contacts', 'users.id', '=', 'contacts.user_id') ->join('orders', 'u...
Solutions given in the past year. Excluding solutions from thread authors.
Select a tag below to filter the results
The Laravel portal for problem solving, knowledge sharing and community building.
The community