Support the ongoing development of Laravel.io →

4,587 Threads

lockForUpdate on Controller->Service->Repository->Model pattern

Hi, I have a Controller that needs to process a form and then do some database checks that involve l...

0 Likes
0 Replies

How to use a count-aggregate function directly on a pivot table?

I am looking for the equivalent in Eloquent/ Laravel to the SQL statement SELECT label_id, COUNT(*)...

0 Likes
2 Replies

Database caching not working ?

Hello, I made a website that allow users to post pictures. Each user's page propore pulique his phot...

0 Likes
1 Replies

Can't access data in pivot table

Hello, I'm having an issue with eloquent (outside of laravel) I can't get access to my data in the p...

0 Likes
3 Replies

¿Me podeis ayudar a relacionar 2 tablas mediante una tercera?

Quiero relacionar platos de comida con cierta cantidad de alimentos Tabla Recetas { id titulo descr...

0 Likes
2 Replies

Eloquent ORM: querying a limited set of results?

is there a way to do this with Eloquent without having to run Raw queries etc? (select count(`win`)...

0 Likes
1 Replies

Laravel Eloquent One to Many relation function not found

Scenario is: Model 1 = Room Model 2 = Hotel Model 3 = City Rooms belongs to Hotel, Hotel has many Ro...

0 Likes
1 Replies

Share data between different controller action methods

Is there a way to share data between different actions in a controller? I run the same queries in th...

0 Likes
3 Replies

Whirlpool password encryption

Hello, sorry for my bad English. I have accomplished create a form and register an account in a MySQ...

0 Likes
3 Replies
posted 9 years ago

migration, add primary key to id, username, email

Hi, i have this migration to create users table Schema::create('users', function(Blueprint $table) {...

0 Likes
4 Replies

re-model inheritance

I would like to have something that - in an object-oriented language - would be called inheritance....

0 Likes
1 Replies

problems rebuilding migrations table

Hi, I'm not sure what happened but I did a "php artisan migrate:status" from my vm and it...

0 Likes
4 Replies

Laravel datatables filtering relationship database needed some help

Hello there, How can filtering data of nested and many relations tables on this example Models Categ...

0 Likes
0 Replies

Database Many to Many to Many

Currently I have a Users table. Each user can have many interests. and each interest can have many p...

0 Likes
1 Replies

How to query a pivot table

I am looking to create a following system similar to Twitter, as far have come up with below. I am l...

0 Likes
0 Replies

User foreign User table

Hi all I need create user table with foreign. The migration run correctly, but How can define relati...

0 Likes
2 Replies

Migrate codeigniter queries to laravel

Hi, I have very very long file contains a lot of queries was write in CI and I wondering if there a...

0 Likes
0 Replies

How to change table in belongsToMany?

How can I replace existing relation? At this moment, I have tables: requirements user_requirement...

0 Likes
1 Replies

Eloquent groupBy make “SQLSTATE[42000]” with valid SQL query in Laravel 5.3

Hi, I have a strange problem with Eloquent which I'm trying to do the following: $this->node = \D...

0 Likes
0 Replies

access trait variable from controller

good day all, i am currently working on a little project for this group of gamers. They asked me to...

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