Support the ongoing development of Laravel.io →

4,599 Threads

Mutators problem

I have Email model with: public function getEmailJsonAttribute($value) { return $value ? json_de...

0 Likes
1 Replies
Solved
posted 10 years ago

ErrorException generate:migration

Guys, This error shows up after generating a new migration: [ErrorException] file_put_contents(C:\we...

0 Likes
1 Replies
Solved

Relationships, Eager Loading and Pagination

I have 3 tables: Topic: id Sub-Topic: id, topic_id Resources: id, subtopic_id Topic has 'hasMany' re...

0 Likes
0 Replies

withTrashed() failed after upadting to 4.2

After updating to 4.2 using composer update, I have added use SoftDeletingTrait; protected $dates =...

0 Likes
3 Replies
Solved

Retrieving primary key after row insertion

I have three tables - users, spots, and tags When a user creates a spot (location), they also create...

0 Likes
2 Replies
Solved

Convert fluent query to Eloquent

Hello I have this query: $galery = DB::table("galery") ->where("approved"...

0 Likes
0 Replies

Take all user post comments

How can I take all user post comments? I'm already using morphTo() method between comments and posts...

0 Likes
3 Replies

Eloquent Many to Many query

Hello I have following structure Table categories Table posts Table category_post Table users Table...

0 Likes
0 Replies

Sorting database values using usort and Sortby(collection method)

I am trying to use usort and sortby to basically after the code below is 1. sort $featureLists by 'f...

0 Likes
0 Replies

date time format database field

I am using DB::raw how can i format a date field in the database 'DATE_FORMAT(created_at,"%m %j...

0 Likes
3 Replies

Tracing database changes

Hi, is there an easy way, to trace the changes in a database using eloquent? I am using a mySQL data...

0 Likes
4 Replies

Only created_at, updated_at timestamps are inside SQL when using Model::create()

I have laravel to automatically manage the created and updated timestamps when I create a new model....

0 Likes
3 Replies

MySQL query: where field is not equal to some of the given values

Hi, I have to list some records related to users without the given parameters. Is there any way to m...

0 Likes
3 Replies
Solved
posted 10 years ago

How to set existing table column to be unique in a migration?

I have a column already called "name" in a table "manufacturers". I want to writ...

0 Likes
7 Replies
posted 10 years ago

Seeding a foreign key

I have this for Manufacturer seed class ManufacturerTableSeeder extends Seeder { public functio...

0 Likes
8 Replies
Solved

php artisan migrate not defined - deployment

I'm trying to deploy a locally working Laravel 4 project on a Strato.com-Server. Locally I can execu...

0 Likes
0 Replies
posted 10 years ago

why is simple migrations commands messed up.

I am following a guide and it seems that the migration command neither generates the code it is supp...

0 Likes
2 Replies

Homestead: The APP_ENV var is not set when using artisan tinker

Hi there, I have read over all the posts I can find on here about the APP_ENV, and am using the meth...

0 Likes
1 Replies

What a way to repeat record and store

$number= Input::get('count'); //send number 4 $text = "hello"; fo...

0 Likes
0 Replies

multiple hasMany

Hi, I got a bit confused. for simple messaging system, consider we have two models: User model &...

0 Likes
1 Replies
Solved

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.