Support the ongoing development of Laravel.io →

4,311 Threads

Model save, sql cant be null while default value is set

I cannot figure out why im not allowed to insert a null or empty while SQL default is set got this e...

0 Likes
3 Replies

Inverse of hasManyThrough

Which is the inverse relation of hasManyThrough? like in example: Country -> User -> Post in c...

0 Likes
2 Replies
posted 6 years ago

Timestamps error when ->using('PivotModel')

class Order extends Model { public function sms() { return $this->belongsToMany(...

0 Likes
0 Replies

Eloquent Query - Relation between tables

Hi ... I need to make an appointment and I'm not sure how to do it. I need to know which model1 is r...

0 Likes
1 Replies

how to do a geolocation

hi i have a table with Business and for all biz i have a latitude and longitude i have the latitude...

0 Likes
1 Replies

Using Illuminate/database outside of framework

I am trying to use the package with my CodeIgniter project by following the instructions given in re...

0 Likes
2 Replies
Solved

Working with spatial columns in Eloquent model

Hi, I'm working with Laravel 5.5 and MySQL 5.7 and I have a table that stores travels data with orig...

0 Likes
2 Replies

Is there any benefit to specifying a class instead of a string in a model's relations?

Is there any benefit to the following 2 pieces of code in a model class? Which one should I adopt an...

0 Likes
2 Replies
Solved

Best practices on creating scheduled tasks / jobs

Hi guys. Again, it might be just me, and maybe I’m expecting too much from the framework, but does a...

0 Likes
0 Replies
posted 6 years ago

JSON field to Model Attributes for Data Table with Paginate

My code has Json Column named: json for Custom User Fields. I want my datatable to get that json col...

0 Likes
0 Replies

eloquent palying with some null and other stuff related to date & time

Hello, In my work I regularly played with date & time with some date start & end (or valid f...

0 Likes
0 Replies
posted 6 years ago

Nicer way to append relationship count to model

So i've got two objects, a Client and Project, there is a hasMany relationship from the client to th...

0 Likes
1 Replies

Tutorial Hotel booking system with Laravel and AngularJS

Hello, i'm Andrea, the owner of codetutorial.io. I've recently posted a tutorial on how to create a...

0 Likes
1 Replies
posted 6 years ago

Create new record and their relations

I am working in a project where the users have a rate plan associated. When a new user is created, a...

0 Likes
0 Replies
posted 7 years ago

belonsToMany returns empty when eager loading and using leftjoin in Eloquent query

I am very new to eloquent and I am not using it within Laravel, but I don't think that it matters in...

0 Likes
0 Replies

HasMany relateships errors and cant access my data which is related to

Hello, first of all sorry for my bad english.. I have a problem with model relationships, i cant acc...

0 Likes
0 Replies

Ran into issues creating a simple search filter

Hi there Laravel artisans, this is my first post on this forum. I am using Laravel 5.4. So currently...

0 Likes
0 Replies

4 tables relationship?

Hello people! I am very new to Laravel and watched some videos but pretty confused about Eloquent re...

0 Likes
3 Replies
posted 7 years ago

Trigger deleted event without actually deleting the record

Scenario here is that while deleting a record I am not actually deleting the record, just updates th...

0 Likes
1 Replies

What's the time limit of 'wasRecentlyCreated' attribute?

Has anyone used the 'wasRecentlyCreated' attribute of Eloquent models? I want to know their time lim...

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.

© 2024 Laravel.io - All rights reserved.