Support the ongoing development of Laravel.io →

4,311 Threads

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

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 9 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

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

Limit output data in eloquent query

Hi! I have two models, for example User (name, email) and Address (user_id, address, zip); If I call...

0 Likes
0 Replies

Where conditions on eloquent relationship

I have two tables auctions and bids and models for them are as follows public function bid() { retu...

0 Likes
2 Replies

Call to a member function delete() on null

I keep getting the error "Call to a member function delete() on null" for the following, w...

0 Likes
0 Replies

Two-Sided Eloquent Relation?

Hello, in my application users can add other users (to establish a "friendship"). Therefor...

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.