REFACTORING #1880 @4h30m: another ugly refactoring commit

This commit is contained in:
Michal Kváček
2016-10-25 16:50:04 +02:00
parent 28f67ffe3c
commit cc999dd24e
71 changed files with 827 additions and 608 deletions
+25 -4
View File
@@ -11,11 +11,32 @@
|
*/
$factory->define(App\User::class, function (Faker\Generator $faker) {
use App\CMS\Contracts\Repositories\Content as ContentContract;
use App\Models\Content\Content;
use App\Models\User;
use Carbon\Carbon;
$factory->define(User::class, function (Faker\Generator $faker) {
$email = $faker->email;
return [
'name' => $faker->name,
'email' => $faker->email,
'username' => $email,
'email' => $email,
'name' => $faker->name,
'password' => bcrypt(str_random(10)),
'remember_token' => str_random(10),
'role' => 'admin',
];
});
$factory->define(Content::class, function (Faker\Generator $faker) {
return [
'title' => $faker->sentence(5),
'userId' => 1,
'url' => $faker->slug(5),
'pageContent' => $faker->text(1500),
'metaDescription' => $faker->text,
'moduleHandler' => config('staticpages.handler'),
'language' => env('LOCALES'),
'publishedFrom' => Carbon::now(),
'status' => ContentContract::STATUS_PUBLIC
];
});