Support the ongoing development of Laravel.io →

4,606 Threads

Use of case and count in laravel

How to convert this sql query in laravel SELECT SUM(CASE WHEN age_c < 18 THEN 1 ELSE 0 END) AS [U...

0 Likes
0 Replies

How do you delete all relationships for a model?

This seems really simple (and probably is), but it doesn't seem to be covered in the documentation....

0 Likes
2 Replies

Eloquent not setting timestamps in profiles table

Per the docs, I was expecting Eloquent to automatically fill created_at and updated_at attributes. h...

0 Likes
1 Replies
posted 8 years ago

Laravel Oracle

Hi i install the package 1 https://github.com/yajra/laravel-oci8 with succes , 2 i add Yajra\O...

0 Likes
0 Replies

Laravel sort items by column relation ?

I would like to sort items by column relation in laravel (5.1) I have a database table called intere...

0 Likes
0 Replies

Joining Multiple Tables

I have 3 tables Course , Lesson , Assets A Course will have multiple Lessons and 1 Lesson will be li...

0 Likes
2 Replies

Store output of foreach lopp in the database

Hello, I'm new with Laravel and web development in general. I'm learning while trying to build my ow...

0 Likes
6 Replies
Solved

Using the Eloquent accessors and mutators to automatically convert SQL enum into human-readable form?

I'd like to know if the accessors and mutators could be (ab)used for this purpose, from what I gathe...

0 Likes
1 Replies

php artisan migrate showing no success message on terminal and no migration occurs in DB on laravel 5.2

I'm trying to migrate a cloned project. I've set the .env file with credentials matching my DB and i...

0 Likes
1 Replies

SQL Server weirdness - unable to connect using DB class, but can using explicit "new PDO" declaration

I've got a controller action which is attempting to call a stored procedure on a MS SQL Server 2008...

0 Likes
0 Replies

Table grouping in blade template

i have database that shows like this and this is the blade template to show the table :...

0 Likes
1 Replies

"Double" Relationship Count

Hello everyone, Basically what I'm trying to do is "count" the number of records that two...

0 Likes
3 Replies

Error in exception handler:

need help on this this error: The stream or file "/volume1/web/dar/app/storage/logs/laravel.log...

0 Likes
0 Replies
posted 10 years ago

Schema ->default() for date -> NOW() ?

Hello, Big fan, changing all websites and apps to use laravel. First question, no really good answer...

0 Likes
4 Replies

Chunk missing half the results

Hi, I'm using Eloquent to retrieve results with a chunk. With large collections, the closure seems t...

0 Likes
7 Replies

Inserted related records and returning their ID

I'm inserting related records but need to return the ID of one of the inserted ones. How do I do thi...

0 Likes
3 Replies

Cannot get all objects/models from Many to Many pivot table

Hello, I have a very confusing problem and yesterday spent whole day trying to solve it, but without...

0 Likes
0 Replies

Model Updated event sometimes not firing

Hi, I've been stuck with this problem for days now: I have a service provider that monitors for the...

0 Likes
0 Replies

Sort to nested

Hello Community, I've got the following problem. From my Database u get the following Array of Categ...

0 Likes
0 Replies

How to get the diffrent provider using morphTo() relationship

Hi, I want to get the different provider (venue,vendor) list based on 'map_type_id'. In my package t...

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

© 2025 Laravel.io - All rights reserved.