Support the ongoing development of Laravel.io →
chimmel

chimmel

Joined 4 Aug 2014

Statistics

Threads 12
Replies 19
Solutions 1
Articles 0
posted 8 years ago

Seeding with same code another model throws error??

I have two tables, manufacturers & models that I'm seeding via factories. ManufacturersFactory:...

0 Likes
0 Replies
posted 8 years ago

Seeding with faker in a module

I am using https://github.com/nWidart/laravel-modules and have a module Cars. In CarsDatabaseSeeder...

0 Likes
0 Replies
posted 8 years ago

Hesitant to start project along the lines of YachtWorld; help?

I want to build a comprehensive practice project. I am a virtual Laravel virgin. This project will i...

0 Likes
0 Replies

Table seeder works individually but not as the last seeder called in the DatabaseSeeder seed sequence?

I have a seeder that ended up working when I added protected $guarded = ['id'] to the model class of...

0 Likes
6 Replies
posted 11 years ago

Eloquent relationships & seeding

Here is part of my Listing model file: public function model() { return $this->belongsTo('Model'...

0 Likes
4 Replies
replied 11 years ago

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

That made an error when I refreshed my migrations..? (Before I'd just left my down function drop_uni...

0 Likes
replied 11 years ago

Seeding a foreign key

What I ended up with: public function run() { DB::table('models')->delete(); $records = [...

0 Likes
Solved
replied 11 years ago

Seeding a foreign key

Oh I need $manufacturer[0]->id Got it

0 Likes
replied 11 years ago

Seeding a foreign key

$records = [['Echo', 'Toyota']]; $manufacturer_id = DB::table('manufacturers') ->where('name', '...

0 Likes
replied 11 years ago

Seeding a foreign key

Ok unfortunately it's still not quite working when I specify id as an array element. <?php class...

0 Likes

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.

© 2026 Laravel.io - All rights reserved.