Support the ongoing development of Laravel.io →

4,311 Threads

posted 8 years ago

How to get "base" Eloquent query builder

I'm writing something that is performing an eloquent query on a model called Enquiry. The actual que...

0 Likes
2 Replies
Solved

Create join without "ON" clause

Hi Guys...i need some help...i need to implement something like this... select * FROM matchscore_pr...

0 Likes
2 Replies

database, model, eloquent convention

hi, I'm started to use Laravel and have a question about the underscore convention when creating tab...

0 Likes
4 Replies

Gate policy for attaching a role to a user

Hi, I have a question regarding system design of a REST API. I have users and roles and want to atta...

0 Likes
1 Replies

Optional eager loading

Hi guys, Is it possible in Laravel/Eloquent to only eager load a relation when a condition is met? F...

0 Likes
1 Replies

Laravel hasMany() + where() returns where conditions in opposite order

Using the following: return $this->hasMany(Text::class, 'item_id')->where('item_type', 'produc...

0 Likes
1 Replies

new user after ajax validation with laravel

I want to make a record after validation of data sent with ajax. the idea is to run the function Cre...

0 Likes
0 Replies

Custom Fields / EAV

I've a few projects coming up where I'll need to allow users to create custom fields on things like...

0 Likes
3 Replies

Dynamic Relationship with type and id

I have a table to store all emails sended by laravel. I can fire events and store different informat...

0 Likes
0 Replies
posted 8 years ago

changing datetimeformat for all models

this include the base Model class itself, any idea on how to achieve that?

0 Likes
0 Replies

Laravel hasOne + group_by, get sum

I'm currently scratching my head with this one. What I have. $entries = Meta::whereIn('settlement_id...

0 Likes
0 Replies

Easy way, package?, for patching migrations?

Hi, Is there an easy way to do updates to existing tables? Something that would be run when a table...

0 Likes
1 Replies

Return no of correct answers

Hi, I'am new to Laravel, I'am trying to develop Multiple Choice Question Application, I need to get...

0 Likes
2 Replies
Solved

[5.2] - Using a custom connection in your models

So I have a command that creates a database connection on the fly like so: protected function creat...

0 Likes
1 Replies

how to save array of json Laravel Vue

I posted this question on Laracast forum.However,I have not got a solution,so please excuse me to po...

0 Likes
1 Replies
posted 8 years ago

Model events not firing

Greetings... I am updating some models in this fashion: Foo::where('name', '=', 'bar')->update(['...

0 Likes
3 Replies
Solved

Laravel recursive tree to flat

I created simple recursive relationship: public function children() { $children = $this->hasMany(...

0 Likes
4 Replies

recursive function many-to-many self referencing model

I have a model called Product that has the following self referencing many-to-many relation: // pare...

0 Likes
0 Replies

display related object in blade ( dinamicly )

the solution must be simple but i cant see it Iam passing an array to the view, whit all the fields...

0 Likes
0 Replies

Linking two tables to a master table of data. Two foreign keys?

I have a real estate site with a master table of listings. Each listing belongs in one subdivision...

0 Likes
1 Replies

Thanks to our community

Solutions given in the past year. Excluding solutions from thread authors.

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.