Support the ongoing development of Laravel.io →

991 Threads

Laravel using wrong table name?

Here's my Level model: class Level extends Eloquent { protected $table = "levels"; }...

0 Likes
4 Replies
Solved
posted 10 years ago

Help with relation query

Hello, My query is returning the wrong product. My Order.php has a relation of public function items...

0 Likes
2 Replies
Solved

Non-static method Confirm::posts() should not be called statically, assuming $this from incompatible context

These are my models User public function posts() { return $this->hasMany('Post'); } P...

0 Likes
5 Replies
Solved

Combining two query (WhereIn with Where) x 2

$userCollection = DB::table('collections') ->whereIn('user_id', array())...

0 Likes
3 Replies
Solved

Cannot find records using ->where() and booleans

Hi, I'm having a problem. Using migrations I create the following field: $table->boolean('is_clos...

0 Likes
1 Replies
Solved

Issues with Eager Load With Limit & Variable

The following would give me collection without Items. $collectionList = Collection::where('user_id',...

0 Likes
7 Replies
Solved

Visible, Hidden, Fillable & Guarded with Foreign Keys

Hi, First question: What options should foreign keys use? Guarded? I have an Article object that has...

0 Likes
3 Replies
Solved

Migrations from 3rd party packages

Hi, What would be the best method to set up a script/command to run through general migrations as we...

0 Likes
2 Replies
Solved

Store data in memcached

Hi, Q1, Is there anyway i can see how Memcache works? with laravel? What does Laravel set in the Key...

0 Likes
3 Replies
Solved

Limit Relationships in Eloquent

Hello All, I have a self project. I am trying to create an application that can track my financial s...

0 Likes
1 Replies
Solved

hasManyThough return wrong ID

Hi Every body, my code is here http://laravel.io/bin/NmmV Categoria -> Fisrt Model, parent of the...

0 Likes
2 Replies
Solved

Database Eloquent Modeling with dynamic table names ?

How can I model dynamic tables names. For example. A product has orders, all orders for the same pr...

0 Likes
1 Replies
Solved

Database Truncate Even If It Has Foreign Key

I have a database seeder begins with: DB::table('lessons')->truncate(); But when I run seeder, [I...

0 Likes
3 Replies
Solved

query returning something wrong

Hi... I started using laravel 2-3 months ago and for the first time I have a problem I can't solve :...

0 Likes
1 Replies
Solved

Many to Many Relationship problem

So i have problem about many to many relationship implementation in laravel I have two model, User a...

0 Likes
1 Replies
Solved

Can I set database credentials based on environment

I'm deploying an app with fortrabbit, as you may know, fortrabbit does not uses localhost and have o...

0 Likes
2 Replies
Solved

Eloquent model default scope.

Hi all, I am looking to create two models, both on top of the same table. I know that I could do wit...

0 Likes
2 Replies
Solved

Add two months to the current date

Hi, I am trying to add two months to the current date : $sale->sale_date = date('Y-m-d 00:00:0...

0 Likes
8 Replies
Solved

Storing multile selections into database

Hello, I have a form with select name "interests" and i present multiple options so i am u...

0 Likes
4 Replies
Solved

Adding Select statement to ORM

Retrieving A Record By Primary Key $user = User::find(1); var_dump($user->name); Is there anyway...

0 Likes
4 Replies
Solved

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.