Support the ongoing development of Laravel.io →

4,311 Threads

Translate of SQL request

I have a complicate request that I hope translate with Eloquent ORM or with Query Builder, but I can...

0 Likes
2 Replies
Solved

fluent query builder, mysql group issue

I have 3 tables: users, blogs, blogcomments. on the main blog page, i want to get the blog's title,...

0 Likes
0 Replies

Model: columns' names in uppercase on MySQL, a request for better solution

Hi, It's my first post and, in fact, isn't properly a question, but a request for suggestions becaus...

0 Likes
0 Replies
posted 10 years ago

Eloquent query to build HTML table and separate returned rows into Month Columns

Hey guys, I've got a form that gets used to perform an inspection. 1 Inspection is completed each mo...

0 Likes
0 Replies

Symfony \ Component \ Debug \ Exception \ FatalErrorException Call to undefined method Illuminate\Database\Eloquent\Collection::save()

I am trying to call Eloquent's save() method on an existing record but getting an error from Illumin...

0 Likes
2 Replies
Solved

Upgrade to 4.2 - DB Queries return nothing

$locations = Locations::find(1); // null $locations = Locations::all(); // [] $locations = Locations...

0 Likes
3 Replies

Ardent and forms with multiple models

I have a form that allows an admin to update a user. In this form, I have a multi-select for roles....

0 Likes
2 Replies
posted 10 years ago

Trying to get property of non-object

i tried retrieving a single content using the id and passing the variable to the view, but it was te...

0 Likes
1 Replies
posted 10 years ago

Model::has( 'relation' ) ... is there a Model::doesntHave( 'relation' )

Hi, im trying to find or figure out how to select all results that doesn't have a relationship... an...

0 Likes
2 Replies
Solved

Display data on different views

Hello guys, I have some posts. How can i display for example on profile page just the posts of a spe...

0 Likes
1 Replies

Eloquent object ogininal values are not the same as the attribues

Hi, I want to display a value from my model, but it always gives me '0' as an integer while the colu...

0 Likes
2 Replies

model id is 0 inside eloquent created event

Inside my function that is triggered by the 'created' model event, my object id is 0. My id column i...

0 Likes
0 Replies

How to drop table contents with artisan tinker?

I have tried in tinker cli: Schema::drop('pages') but it just drops the table 'pages', how can i dr...

0 Likes
2 Replies
Solved

A wrong query containing 3 models

Hi all, I have 3 tables: books, authors, and publishers. Books-authors and authors-publishers have o...

0 Likes
7 Replies

Laravel relationship

I need help writing a query in eloquent from three tables, where fields table, field_value and users...

0 Likes
0 Replies

4.1 to 4.2 update cant return a simple hasmany object from db gives error!

I am simply just doing this $me = \Auth::user(); return $me->program()->get(); GIVES me; Inva...

0 Likes
1 Replies

How to load models?

I have a model like this: namespace Models; use Eloquent; class Sites extends Eloquent { public...

0 Likes
2 Replies
Solved

database relationship

hi i have multiple categories and each category has many posts, i want fetch 4 last posts for each c...

0 Likes
0 Replies

Using "has" to query on pivot table (aka join table)

I've seen some threads that are potentially similar (e.g. http://laravel.io/forum/05-01-2014-eloquen...

fakhriahmedoff liked this thread

1 Likes
2 Replies
posted 10 years ago

Doubt about error while updating a table with model configuration set as timestamps = false.

Hello guys, first post here. :) So today I created a new table on the project I have been working fo...

0 Likes
0 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.