Support the ongoing development of Laravel.io →

4,312 Threads

Select records from one table that do not exist in another

How do i Select all records from one model that do not exist in another model in Laravel ? So far he...

0 Likes
1 Replies
posted 5 years ago

Why User::find method call User constructor 3 times?

In api.php Route::get('/abc', 'App\UserController@abc'); In UserController.php public function abc(...

0 Likes
4 Replies

How do i allow entry twice in 24hrs

I am trying to create an workplace check in and checkout system for workers but i want to allow a us...

0 Likes
0 Replies

Get the child to parent title

I am trying to get recent comments. Using the below works. $recentcomment = Comment::latest(); how...

0 Likes
3 Replies

Checking if data exists in child of a parent before creating

Am new to laravel (total greenhorn), it would be awesome if anyone can help me with this. I have a m...

0 Likes
4 Replies
posted 6 years ago

Function to check if user has data in multiples tables

I need to make a function witch can be called in a foreach loop such has : foreach($users as $user){...

0 Likes
4 Replies
posted 5 years ago

"with" clause with attributes returning empty results.

I am trying to retrieve a specific attribute from a one to many relationship using "with"....

0 Likes
1 Replies

RouteBinder - an open source library - feedback most welcome

RouteBinder is a package designed to help you with clean model validation when using Laravel route b...

0 Likes
0 Replies

morphTo Relationship count()

Hello There, I have a morphTo between two tables Courses and Workshops and the Pivot Table is Regist...

0 Likes
1 Replies

Detach Pivot with 3 keys

It has the following tables: companies, addresses and company_address. I want to remove a record fro...

0 Likes
4 Replies
Solved

Difference between Myclass::insert() vs Myclass::create()?

Can someone let me know the difference between Myclass::insert() vs Myclass::create()?

0 Likes
4 Replies

MyClas::insert($data) not calling ORM save event?

we are trying to log the changes made to the models via ORM laravel 5. There are default events whic...

0 Likes
0 Replies

Custom Intermediate Table Models

https://laravel.com/docs/5.8/eloquent-relationships#defining-custom-intermediate-table-models Why wo...

0 Likes
1 Replies

I think Athena would be cool too.

https://laravel.io/forum/anyone-using-athena-with-laravel-5 I couldn't find reply button on this thr...

0 Likes
0 Replies

Undefined offset: 0

Controller: $indirizzo = DB::table('indirizzoimpiantos')->where('id_impianto', $dettagliimpianto[...

0 Likes
1 Replies

Eloquent result different from MySQL result

Hi all. I have 3 tables in Laravel: doctors, clinics and clinic_doctors. Doctors have relation: publ...

0 Likes
1 Replies
Solved

Connection Timeout while retrieve data using REST API

Hi all. I just deploy my laravel app using docker container on my GCP instance. I can run the migrat...

0 Likes
0 Replies

Model split response on column true.

I have a query that I was previously calling with Quote::with(['detail.orders'])->findOrFail($id)...

0 Likes
1 Replies

Make Route Model Binding for Video (Working)

Hello , I'd hoped you could help me make what I already have a little cleaner. The goal: Show a Vide...

0 Likes
1 Replies

Eloquent not checking if int. records are soft deleted

Hi everybody! My team and I wanted to know if this is the normal way Eloquent relationships handle s...

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.