Support the ongoing development of Laravel.io →

4,311 Threads

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

implement user-role -permission system

hi i have two problem that i don't know how to solve this situation: i have user role permission tab...

0 Likes
6 Replies

Trying to get property of non-object if related record of hasOne relation is missing

I have ClienteFornitore Model with hasOne relation to Pagamento Model public function pagamento(){...

0 Likes
1 Replies

What's the best way to access distant relations through a method in my Address Model?

I have an Address, Zip, City and State model and I would like to create an easy way to access the St...

0 Likes
0 Replies

Update data using array

Hey, i wanna update my data using array, but its error 'cause im using "like" query while...

0 Likes
1 Replies

Call to a member function getDateFormat() on null

I've just installed laravel 5.3.16 And I've added composer require jenssegers/mongodb package to my...

0 Likes
1 Replies

Laravel Query Builder Issue with get()

I'm following the Laravel from Scratch series from laracasts and am trying to build my own website....

0 Likes
1 Replies
Solved

How to send email to Mailtrap server?

I am currently trying to send an email to the mailtrap server to test whether the email confirmation...

0 Likes
1 Replies
posted 7 years ago

laravel join query where AND OR both cluse

how to write Laravel 5.4 Eloquent for the query like this, where ( (table1.fname like %xxxxx% ) OR (...

0 Likes
9 Replies
Solved

Fetch names of Polymorphic Realtionships

I have a model, say Model A. This model have polymorphic relationships with some other models. On de...

0 Likes
0 Replies

Composite PK for organization, role, permission?

I am trying to implement a DB schema in which I have users that belong to one organization or more,...

0 Likes
1 Replies

Seed random dates in model factory.

I want to seed a mysql format date in my Model Factory which is like 2017-08-19 and use mt_rand or a...

0 Likes
0 Replies

Laravel 5 – querying items by many-to-many related model (value in pivot table)

Hello! I've got a following many-to-many relation: attendees - attendee_tag - tag where attendee_ta...

0 Likes
0 Replies

how to bind a model to another ?

some packages comes pre-packed with its own models ex.Cart but sometimes i want to add some extra lo...

0 Likes
0 Replies

Distribute collection into collection of related domain model

So I have relations : class Folder extends Model { public function files() { return...

0 Likes
0 Replies

Controller - Service - Repository architecture

Hi, I am just refactoring my code to follow some common patterns in application development. The pat...

0 Likes
25 Replies

Eloquent cursor not working as expected - trying to load whole table

Hi, I am having an issue with the Eloquent's cursor method. foreach (ORM::where('sent', false)->w...

0 Likes
0 Replies

Undefined variable: images - Passing data from Controller to View

At the moment I am trying to pass a value of a variable that is $images from my EntryController to t...

0 Likes
0 Replies
posted 7 years ago

withDefault for hasOne?

Does withDefault() work with a hasOne relationship? I haven't been able to get it to work.

0 Likes
0 Replies
posted 10 years ago

Once again: Difference between hasOne / has Many and belongsTo/belongsToMany

Hi! I know, thist question has been discussed already in this forum. But sorry, i just don't get it....

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