Support the ongoing development of Laravel.io →

4,237 Threads

Laravel Eloquent Route Problems When Editing via PUT

Gentlemen, I have had a problem for days, without getting a solution. I try to pass the route, but a...

0 Likes 3 Replies

Weird eloquent bindings when using addSelect method.

Laravel Version: 7.13.0 PHP Version: 7.4.6 Database Driver & Version: Mysql & 8.0.20 Descr...

0 Likes 0 Replies

Call to undefined method App\UserPackage::get05Attribute()

I am trying to use $appends laravel feature see Docs to add a custom attribute to my Model instance....

0 Likes 0 Replies

Using static data source for a Model instead of DB

I need to replace a classic DB connection for a Model with a Json static file. I can easily open the...

0 Likes 0 Replies

Try to get some data from an object

Hello everybody, I have this SQL Query : ->select('herbs.name as hname', 'herbs.scina...

0 Likes 0 Replies

Help to covert SQL query to laravel query builder

Hello, I am new to Laravel. As the name applies I need a small help to convert this SQL query to lar...

0 Likes 2 Replies

how instead call an Eloquent STATIC method from controller

Laravel 6.x the below works… how instead to call an Eloquent Laravel db method??? how instead call a...

0 Likes 5 Replies
Solved

Assignment of students to automatic examination centers

Hello community, I have just set up a project to assign students to the ABC in examination centers,...

1 Likes 0 Replies

Data insertion in 4 tables with relationship

Hi i have a problem inserting data to 4 tables. Customers : with data of customers. this table hasMa...

0 Likes 0 Replies

Join

HI sorry for english im newbe to laravel ,im tryng to change a code wrte from another developer. I h...

0 Likes 0 Replies

Call model function

Hi, I have been approaching Laravel for a few days. My simple question, considering that I have done...

0 Likes 0 Replies

Unexpected behaviour when using Event/Listener

Hello Guys! I have some problems with the usage of Events and Listeners. I'm trying to make an Audit...

0 Likes 0 Replies

How to Make relationship for category,subcategory,product

I tried to retrieve the record from three table category,sub-category and products. How to retrive r...

0 Likes 1 Replies

User Roles Recursive

Hello. I use Laravel with UserAuth and Roles. All works fine. Now I want to add many Roles. The Role...

0 Likes 0 Replies

Non-static method should not be called statically for scopes

I have a model with those methods: public function waiting() { return ! is_null($thi...

0 Likes 2 Replies

PHPUnit 8.5.2 Database test unit testing

When I run the phpunit command vendor/bin/phpunit I get this error. I did not understand where I mak...

0 Likes 1 Replies

Eloquent relation count problems

Hi, I'm currently having the following problem that $eloquentEntity->relation->count() and $el...

0 Likes 1 Replies
Solved

[Packages] Laravel Policy Builder

Hi everyone, I want to share my new package which allows to define within policies methods for build...

0 Likes 0 Replies

Laravel 6 - Dinamically set DB Connection on model - problem

Hello, On my project, every user has his/her own database, so, to mass assign forms I need to set th...

0 Likes 0 Replies

Order by highest calculated value hasmany

I have 3 tables parts id offers id | part_id | quantity | price shippings id | offer_id | quantity P...

0 Likes 0 Replies

Thanks to our community

Solutions given in the past year.

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

The Laravel portal for problem solving, knowledge sharing and community building.

© 2022 Laravel.io - All rights reserved.