Support the ongoing development of Laravel.io →

4,302 Threads

Do you need to create a model for your pivot table?

I have a post table and that post may be included in multiple sections so now I have 3 tables: post...

0 Likes
2 Replies
Solved

How to use unix timestamp in eloquent?

I want to use the created_at, updated_at and deleted_at fields with unix timestamp.

0 Likes
2 Replies
Solved

Pivot generated, but migration error

I am attempting to create a pivot table and ran the cmd: php artisan generate:pivot contractor work...

0 Likes
1 Replies

Eloquent Concatencator

Hey guys, just working on a small package that extends the Eloquent Model class and Query Builder cl...

0 Likes
0 Replies

Show binded sql

Hi; How can I see binded sql? $data = Admin::whereRaw('email = ? ', array($email))->get();

0 Likes
1 Replies

Set the default carbon date format

Hi I'm writing a small app and I am trying to set the default Carbon date format. I have an eloquent...

0 Likes
3 Replies

Foreign key columns without the '_id' suffix

I prefer using foreign key columns wihout any suffix (like 'user' rather than 'user_id'). I can live...

0 Likes
0 Replies

get column name when updated a record

hi everyone according to the question, i want to get column name when update a record. i need this i...

0 Likes
0 Replies

Insert Ignore

I'm looking for the best approach to add an InsertIgnore method to Laravel's query builder. I can ac...

0 Likes
0 Replies

Relationship for match schedules table

Hy all, I'm quite a beginner with Laravel and trying to build a website for the world cup 2014 in Br...

0 Likes
1 Replies
posted 10 years ago

Observing relationship syncing

Hi all, Is it possible to create an observable sync. I am using model::observe to log changes to mo...

0 Likes
2 Replies

Create multiple objects at once

Hi community, I want to create multiple objects with a single click, I want to be able to create a G...

0 Likes
1 Replies
Solved

Is it possible to change laravel's pagination link?

Hi guys! Using laravel's pagination it creates a url with ?page=2 but I want my url to be /page/2. I...

0 Likes
0 Replies

How to Setup Laravel Eloquent in Zend Framework 2?

My current project force me to use zend framework. However, i'm familiar with Laravel framework, esp...

0 Likes
0 Replies

Deleted at defaulting to zero?

Hi. I'm migrating an old database to a Laravel-based app. One issue I'm coming across is that during...

0 Likes
0 Replies

Optimize sql Query

Hi I have one scenrio. their is static content in database table. My table look like this. id ti...

0 Likes
1 Replies
Solved

How to order the first table by a column in the second table

Hi, i have a little problem trying to order the first table based on the second table column. Table:...

0 Likes
2 Replies
Solved

Cannot catch DB exceptions inside seed class

For some reason, I cannot catch DB exceptions inside a seed class: the code never enters the catch b...

0 Likes
1 Replies

How to return a single value from a scope?

This is what I have done so far: public function scopeCityName($query) { return $query ->join...

0 Likes
1 Replies
Solved
posted 10 years ago

How do I compare Collections?

I have two Collections (\Illuminate\Database\Eloquent\Collection) called $admins and $users. Both co...

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.

© 2024 Laravel.io - All rights reserved.