So i tried using multiple conditionals on my join but laravel assumes that on join i will be compari...
I have a model: class Parent extends Eloquent { public function child() { return $this->has...
Which one of these two calls is the prefered way to retrieve guests checked-in at a hotel? $guests =...
Hi all, I get posts with the query below in pagination: $posts = Post::all->paginate(30); I want...
Hi Guys, I'm quite new to laravel and I'm trying to work out how to turn a database table into a HTM...
Why is this good idea? As i see it gets quickly pretty rough when you have 100+ models to work with....
I have three models: User: public function projects() { return $this->hasMany('StoredFile', '...
I am new to PHP and Laravel and this is my first project. I am writing a package that will allow a u...
Hello, Im working on a financial app. Now I have this model : description : string ; account_from :...
Consider the following: student many-to-many with semester (pivot1) lesson many-to-many with cla...
Hi, I have a Project table and a pivot table "like_project" which has 2 columns : user_id...
I have Email model with: public function getEmailJsonAttribute($value) { return $value ? json_de...
I want to be able to take in 3 inputs. A select for a month, a day, and a year. Then, when the form...
I want to be able to take in 3 inputs. A select for a month, a day, and a year. Then, when the form...
I have 3 tables: Topic: id Sub-Topic: id, topic_id Resources: id, subtopic_id Topic has 'hasMany' re...
After updating to 4.2 using composer update, I have added use SoftDeletingTrait; protected $dates =...
My Controller method is: $topics=Topic::with(array('subtopics'=>function($query){ $query->with...
I have three tables - users, spots, and tags When a user creates a spot (location), they also create...
Hello I have this query: $galery = DB::table("galery") ->where("approved"...
How can I take all user post comments? I'm already using morphTo() method between comments and posts...
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