Support the ongoing development of Laravel.io →

4,312 Threads

Where can I keep my collection filters?

Hi, I have controller filters like those: <?php $stats = Stats::all(); $stats_today = $stats-...

0 Likes
4 Replies
posted 10 years ago

One-to-One relationship on inventoory

I have created 2 tables and UnderFiftyDollars will contain all items under $50 to show on a promotio...

0 Likes
1 Replies

Is there a better way?

Hi everyone, http://laravel.io/bin/kYVa9 In the above snippet, you may recoil in horror when you see...

0 Likes
0 Replies
posted 10 years ago

Get table name that is using scope (inside of scope)

So I have scope with following code public function scopeSortable( $query ) { if(Input::has(...

0 Likes
3 Replies
Solved
posted 10 years ago

Laravel ModelNotFound exeption handling with namesapces

I have this problem where laravel ModelNotFound exeption handler catches all exeptions not only rele...

0 Likes
0 Replies

Eloquent where() statements

I'm trying make a function that returns false if there is no inventory available. I need it to searc...

0 Likes
1 Replies

Bizarre behavior of pagination

This is my controller: public function prontuario_index(){ $Prontuarios = Prontuarios::get(15);...

0 Likes
7 Replies

Performant queries on large data sets

I'm building a REST API for a large data set, and running into a performance issue I'm not sure how...

0 Likes
3 Replies

Error: Using $this when not in object context

Hi, i call this somewhere in the CustomerController(): $results = CustomerModel::getCustomers(); Th...

0 Likes
7 Replies

Dynamic "where" on Eloquent Model

Hello, I'm hoping I can get help with a dilema I ran into. I hope it's something simple. I have a me...

0 Likes
4 Replies
Solved

Storing into database a model that contains multiple models which might be of different type.

Hello guys I have this problem. I have a Form that contains several pages (think a multiple step pol...

0 Likes
3 Replies

Search child relationship

I feel this may be a simple question; but I can't, for the life of me, figure this out. I'm relative...

0 Likes
1 Replies
Solved

getDates() and getDateFormat() conflict

I am saving created_at and updated_at as Unix timestamp in DB. I have overridden my getDateFormat()...

0 Likes
0 Replies
posted 10 years ago

Database model

This is possibly not a real Laravel-question but I'm developing my new site in Laravel. This is the...

0 Likes
5 Replies

Combining Eloquent libraries

Hey guys, I'm having a small problem regarding the combination of multiple eloquent based libraries....

0 Likes
0 Replies

Many to Many Polymorphic relationship catch-all method?

Ok so I have a certifications table which can have many employees or materials. Also the employees a...

0 Likes
3 Replies

migration files from existing tables?

Is there a way to create migration files for existing tables quickly?

0 Likes
1 Replies

Get an user who has specific relationships

Hi. I have a user with countries relationship. (hasMany) user_id 1 country_id 1 user_id 1 country_i...

0 Likes
2 Replies
Solved
posted 10 years ago

Call to undefined method User::save()

Hello everyone. I have a mistake when I run the routes.php with a notice error: Call to undefined me...

0 Likes
7 Replies

Many to Many eager loading strange behaviour

Hello all, I've been struggling with a strange behaviour when trying to load partial information fro...

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.