Support the ongoing development of Laravel.io →

4,314 Threads

Migration cascade + foreignkey + index

This is my source code: public function up() { Schema::create('messa...

0 Likes
1 Replies
Solved

Getting data from a join in a view

In my controller I have: public function index() { $comments = Comment::pagi...

0 Likes
1 Replies
posted 10 years ago

Model create delete the id attribute

I need to set id manually instead increments, but I have a problem. $user = User::create...

0 Likes
3 Replies
posted 10 years ago

Laravel count/leftjoin Multiple Tables

Hello, i want to select all users from table and check counts if they loggid in from facebook/google...

0 Likes
7 Replies

Controller vs View: Calculating date diff within foreach loop

Users create projects, projects last 14, 30 or 45 days. An "endDay" is calculated using ja...

0 Likes
4 Replies
Solved

Laravel Controller create method not working while saving through AJAX

Here's my View Page <h1>{{$pageName}}</h1> <div class="lms_register_body"> {{For...

0 Likes
0 Replies

Delete with all foreign keys

Hello, I have for example table with user, which can be owner of event or following event. So, there...

0 Likes
1 Replies

Large collection, many levels, getting views out

First, if anyone has a good tutorial on collections, I could use it. I have a collection coming from...

0 Likes
1 Replies

hasOne and insert

Hello all, I have a device table created using this Schema::create('devices', function(Blueprint $ta...

0 Likes
1 Replies
Solved

How do I make limit the information retrieved by eloquent and stop crashes?

The following code, goes through the entire company database and cache's the lower level nested rela...

0 Likes
12 Replies
Solved

Auto Load common class

Hello guys,am new in Laravel,i have been interested to learn it,i found some thing bowwing when eve...

0 Likes
7 Replies
posted 10 years ago

Join in data from pivot table

I have the tables Users Orders Order_Product But no Products table. In my case the products will b...

0 Likes
0 Replies
posted 10 years ago

How to sort by pivoted table in a many-to-many

Here's my problem. I have two models with a pivot So say ModelA belongsToMany ModelB ModelB belongsT...

0 Likes
0 Replies
posted 10 years ago

Error while inserting multiple records in table

Hi guys.. i'm using the following code <?php use Illuminate\Database\Seeder; use Illuminate\Data...

0 Likes
1 Replies

Route Model Binding Using Route Facade vs Router instance.

I'm experiencing an issue where Binding a model to a route works in routes.php when using Route::mod...

0 Likes
0 Replies

Fetch data from 3 tables with Eloquent Relations

I have three tables namely users auctions bids bids table has foreign key to users table and auction...

0 Likes
1 Replies

BelongsTo vs HasOne

I've read a ton on this, and I thought I understood. But now I'm not so sure. I have an 'album' and...

0 Likes
4 Replies
Solved

Database design for multiple user attributes

hi i am building an app with Laravel, and I have users which also have a profile. I am unsure about...

0 Likes
3 Replies
Solved

Paginator Issue

I have a page that has multiple tables with lots of data. These tables need to be on a single page....

0 Likes
15 Replies

How do I perform this search query in eloquent

Hello, I am trying to perform a search query with particular tag names in bookmarks for a particular...

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

© 2025 Laravel.io - All rights reserved.