Support the ongoing development of Laravel.io →

4,311 Threads

Should I have to reload a relationship after an attach()?

I have some code that looks like this: class User { public function addRoleById($role_id) {...

0 Likes
4 Replies

How do you save image to database and display it on website?

I was always against this approach, but now I am reconsidering. Is there a best practice way to do t...

0 Likes
31 Replies
Solved

{L 5.4} Check if User answered a Question right

I get some questions from my database: Controller: public function getQuestion() { $questions = Qu...

0 Likes
1 Replies

Nested relation doesn't work

Hi, I'm new in laravel, and I encounter problem when get relation data through 3 tables.. I had seve...

0 Likes
4 Replies
Solved

Eloquent not returning all results from query?

So this is driving me a bit nuts - Eloquent will not return the full set of data. It's stuck at 426...

0 Likes
2 Replies

Laravel with AWS and DynamoDB for StartUp purpose

Hi guys, First of all: Hello to the Laravel Community. Working as a web developer in an agency I hav...

0 Likes
8 Replies

What type of relationship would the following be? (Users, Departments, and Ranks for Department)

I am building a fairly complex application that will store many different user factors. In theory, e...

0 Likes
2 Replies

Eloquent query - combine "with" and "join"

Hi, is there any way to combine "with" and "join" in a single fluent query? Eg.:...

0 Likes
6 Replies

Unique database for two applications

I am building two applications that are using the same database,one is a RESTful service and the oth...

0 Likes
3 Replies
posted 7 years ago

->hasWhere does not seem to be working on my global scope

Hi, I'm working on a system that has a multi-level multi-tenancy requirement. Each level I require I...

0 Likes
4 Replies
posted 7 years ago

PHP Timeout, Eloquent relationship references parent model

Im experiencing a php timeout error because it takes more than 30 seconds. I have a model (person) t...

0 Likes
0 Replies

Ordering by an Average.

I have two tables Product and reviews, in which the reviews contains a rating. i am trying to order...

0 Likes
2 Replies

SubQuery for Related Model

I am trying to pull all Profiles only if there is a record in the ProfileAttributes table and as a t...

0 Likes
2 Replies

Eloquent between two dates from database

i am trying to get an object from a database where the schema is timestamp period_starts_at timestam...

0 Likes
7 Replies
Solved

Eloquent Polymorphic Many to Many morphTo

Under the heading "Many To Many Polymorphic Relations" in the laravel docs http://laravel....

0 Likes
7 Replies

What is local.ERROR: Call to undefined method Query\Builder::outstandingActions() ?

local.ERROR: BadMethodCallException: Call to undefined method Illuminate\Database\Query\Builder::out...

0 Likes
1 Replies

get last row on relationship Eloquent Or Query Builder

i want get last post On Tag : 1 - paginate All Tags ( order By created_at ) ( for Example : $blogTag...

0 Likes
0 Replies

Inserting MySQL data with AES_ENCRYPT

I have a table that needs to store confidential data in two BLOB columns. The overall SQL statement...

0 Likes
6 Replies
posted 7 years ago

Nested relationship stops working after first result

Here is the query I have: $messages = Message::select('messages.*') ->where('post_id'...

0 Likes
5 Replies

Search where results only if value is not empty

Hello Guys , I have a filter search , and I want to search WHERE , JUST if the value is not empty ....

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