REFACTORING #1880 @4h30m: another ugly refactoring commit
This commit is contained in:
@@ -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
|
||||
];
|
||||
});
|
||||
Reference in New Issue
Block a user