Support the ongoing development of Laravel.io →

4,312 Threads

posted 8 years ago

Composite key

I have the following tables: Table: clients Schema::create('clients', function(Blueprint $table) {...

0 Likes
1 Replies

Reverse working with many to many polymorphic relations

Hi guys, I'm wondering how to deal with this situation: I have this structure: Ingredients (basic li...

0 Likes
0 Replies

Database "lazy connection"

Is it possible to create "lazy DB connection" in Laravel on easy way? If my app cache all...

0 Likes
1 Replies

strange behavior on created_at

Hello, When I fill in a form, the fields created_at and updated_at will be filled in, all ok. I have...

0 Likes
0 Replies

how can i update a row using concat

i have this $data = ['name' =>'Name', 'observation' => "concat($obervation, 'observation'...

0 Likes
0 Replies

Use "http://laravelsd.com/" for building db schema and use those data in laravel 5

I want to create my db schema, model and relations by using "http://laravelsd.com/" and wa...

0 Likes
1 Replies

Passing data to a view and using it in my JavaScript

Hi, I don't understand why I can't access my "reductions" array in my javascript. (Referen...

0 Likes
0 Replies

How do you delete all relationships for a model?

This seems really simple (and probably is), but it doesn't seem to be covered in the documentation....

0 Likes
2 Replies

Eloquent not setting timestamps in profiles table

Per the docs, I was expecting Eloquent to automatically fill created_at and updated_at attributes. h...

0 Likes
1 Replies
posted 8 years ago

Model id = null on object returned from ->create

I'm using the master branch of laravel which is currently pointing to 5.1 I'm trying to get the id o...

0 Likes
2 Replies

Laravel sort items by column relation ?

I would like to sort items by column relation in laravel (5.1) I have a database table called intere...

0 Likes
0 Replies

Joining Multiple Tables

I have 3 tables Course , Lesson , Assets A Course will have multiple Lessons and 1 Lesson will be li...

0 Likes
2 Replies

Using the Eloquent accessors and mutators to automatically convert SQL enum into human-readable form?

I'd like to know if the accessors and mutators could be (ab)used for this purpose, from what I gathe...

0 Likes
1 Replies

"Double" Relationship Count

Hello everyone, Basically what I'm trying to do is "count" the number of records that two...

0 Likes
3 Replies

Convert SQL Query in Relations using Eloquent

Hi, I had a BelongsToMany database schema that worked great, but I added a new table with fk and can...

0 Likes
0 Replies
posted 8 years ago

Eloquent using where in main table and in relation

Hi, I want to build this query out of eloquent (I know you can with QB but for sake of elegance and...

0 Likes
0 Replies

Chunk missing half the results

Hi, I'm using Eloquent to retrieve results with a chunk. With large collections, the closure seems t...

0 Likes
7 Replies
posted 8 years ago

Using a dynamic variable to call a model

How would I go about calling a model using a dynamic variable? I thought $nameOfModel::all() would w...

0 Likes
1 Replies

Inserted related records and returning their ID

I'm inserting related records but need to return the ID of one of the inserted ones. How do I do thi...

0 Likes
3 Replies

Cannot get all objects/models from Many to Many pivot table

Hello, I have a very confusing problem and yesterday spent whole day trying to solve it, but without...

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.