Support the ongoing development of Laravel.io →

4,231 Threads

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
23 Jan, 2020 at 07:34

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

Problem with laravel relations and latest, paginate

hi everyone, im have some relations in my DB and heres the relatin i'm working with: $category = Cat...

0 Likes 0 Replies

Sql Server Date format issue

Hello, First of all I'd like to say that I have no other choice but using SQL Server ( and IIS as we...

0 Likes 6 Replies
Solved

Laravel Query

Hi Guys I have three tables in my database customer, sales, payment . A customer can have many Sales...

0 Likes 0 Replies

Eloquent Has with multiple databases

I'm experiencing trouble with a relationship (5.7). I do have data separated in two databases, which...

0 Likes 0 Replies

hasOneThrough on one table

Hello, I'm trying to set up a hasOneThrough relation on one table. But Eloquent will not look it the...

0 Likes 0 Replies

How to make Laravel api multi-auth with or without passport

How to make API Authentication for (User,Admin)two different table. I tried laravel passport but it'...

0 Likes 0 Replies

Object of class stdClass could not be converted to string

`public function toExcelDisc($schedule_id){ $dataArray = []; $header = $this->getHeader($schedul...

0 Likes 1 Replies

How to add table values by grouping by month

I need to sum values from my table but grouping month by month. Someone can help me?

0 Likes 0 Replies

CRUD update with button from blade

Is it possible to update DB withoud edit form, just to generate random entires or set your own in co...

0 Likes 0 Replies

Trying to implement multi tenancy (DB)

Hello Folks, My dev and I are trying to implement (DB) multi tenancy in a CRM and we are having issu...

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.

© 2021 Laravel.io - All rights reserved.