Support the ongoing development of Laravel.io →

nasaorc

Joined 19 Jun 2014

Statistics

Threads 3
Replies 3
Solutions 0
Articles 0

Eloquent relationship with count

I have three models: User: public function projects() { return $this->hasMany('StoredFile', '...

0 Likes
6 Replies
Solved

Filter not exist columns in Eloquent model

How can I modify the ~~~static::creating~~~ function to avoid "Column not found: 1054 Unknown c...

0 Likes
0 Replies

Eloquent set random not duplicate id when creating records

This is the code of my Eloquent model: protected static function boot() { parent::boot(); s...

0 Likes
2 Replies
replied 10 years ago

Eloquent relationship with count

DanielOReilly said: You can return the list of files for a project by doing the following. $project...

0 Likes
replied 10 years ago

Eloquent relationship with count

DanielOReilly said: You can't use return $this->hasMany('File', 'hash', 'user_hash')->count()...

0 Likes
replied 10 years ago

Eloquent set random not duplicate id when creating records

zenry said: why do you want to generate an id? if it's to mask id's in an url you can use something...

0 Likes

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.