Permalink
Switch branches/tags
Nothing to show
Find file Copy path
8019efe Nov 6, 2018
1 contributor

Users who have contributed to this file

30 lines (23 sloc) 581 Bytes
<?php
use App\Post;
use Illuminate\Database\Seeder;
class PostsTableSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
$post = new Post;
app()->setLocale('en');
$post->title = 'Awesome Translated Post!';
$post->content = 'Hello World! It works!!';
$post->save();
app()->setLocale('fr');
$post->title = 'Super Article traduit en français!';
$post->content = 'Bonjour le monde! Ca fonctionne bien !!';
$post->save();
}
}