Support the ongoing development of Laravel.io →

4,311 Threads

belongsToMany through belongsToMany with 'faked' pivot table (using an SQL View)

So, this question has been asked a lot, but there has to be a better way of doing it. Using a typica...

0 Likes
1 Replies

tinker parsed my error T_PAAMAYIM_NEKUDOTAYIM

I'm trying to insert data using tinker compact method here is my tinker snippet $post = App\Post::cr...

0 Likes
2 Replies
Solved

check for n+1 query

are there any package for laravel that notify you when should you use eager loading for a given quer...

0 Likes
1 Replies
posted 9 years ago

Blog Post on Laravel Relations

If this is not allowed then please delete and accept my apolgies I decided to take a good hard look...

0 Likes
0 Replies

Eloquent Model for one-to-many relationship that joins another table

Hello, I am new to Laravel and I'm trying to rebuild my corporate legacy system using PHP and Larave...

0 Likes
1 Replies

how to select datas from a relation in a collection or change their names before being turned into JSON

I have been stuck on this for a while even after reading other questions & docs from Laravel. I...

0 Likes
5 Replies
Solved

I need to make a menu with counters but the count will differ from subsection to subsction.

I have my query builder that is dynamic, when user checks a subsection, the subsection will be added...

0 Likes
0 Replies

use queryScope in blade template

I have define scope in model like this class Station extends Model { protected $primaryKey = 's...

0 Likes
1 Replies

Getting records with an expiration date

Hello, I have a MySQL database with a table called Articles to store my articles. One of the table f...

0 Likes
2 Replies
Solved

Auto-generate and auto-update timestamps in Eloquent

I am new to Laravel and I am working on my database migrations. For one table, I've included the $ta...

0 Likes
1 Replies

select posts order by most viewed

I'm a new user of laravel and for study teh framework I create a blog. I want to have an option to o...

0 Likes
5 Replies
Solved

How to get records from a table using records from other table as keys?

I have 3 tables: stores, settingkeys and settings. The 'stores' table stores the store names (and ot...

0 Likes
1 Replies
Solved

Relationships return recursion

Hello. I have 3 models and controllers: images -projects -categories And in ProjectControllers I h...

0 Likes
0 Replies
posted 9 years ago

Retrieve data from one table and order by related table column using eloquent

I have two models, Category and Transaction. The table structures are like this.. Categories: id,cat...

0 Likes
0 Replies

pagination is not working in my Laravel 5

Hello in official help here http://laravel.com/docs/5.0/pagination stated that it is possible to...

0 Likes
7 Replies
posted 9 years ago

call Model non-statically

I've got this line of code: $project = Project::find($id); I'd like to change it so that the Projec...

0 Likes
1 Replies

Tutorial - How to craft a digital eshop with Laravel 5

Hello, i'm proud to present the release of a new tutorial series on CODETutorial.io . In this tutori...

0 Likes
0 Replies
posted 9 years ago

Retrieving all users of a specific permission in Laravel 5 / Entrust

How can I retrieve the users of a specific permission in Entrust for Laravel 5.0. use App\Role; use...

0 Likes
2 Replies
Solved
posted 9 years ago

Eloquent - Get all result, group by, order by id

Hey guys, I have a model with versions. I get this records with the following code: $versions = Vers...

0 Likes
1 Replies

question about eloquent relationships

Hey guys! Firstly i want to say sorry about my english it's not my native language. I have a little...

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