Added Production build.

This commit is contained in:
2021-02-24 10:01:35 +01:00
commit 1e27c950c5
140 changed files with 14022 additions and 0 deletions
+28
View File
@@ -0,0 +1,28 @@
<?php
namespace Database\Factories;
use App\Models\File;
use Illuminate\Database\Eloquent\Factories\Factory;
class FileFactory extends Factory
{
/**
* The name of the factory's corresponding model.
*
* @var string
*/
protected $model = File::class;
/**
* Define the model's default state.
*
* @return array
*/
public function definition()
{
return [
'link' => $this->faker->url
];
}
}
+28
View File
@@ -0,0 +1,28 @@
<?php
namespace Database\Factories;
use App\Models\Occupation;
use Illuminate\Database\Eloquent\Factories\Factory;
class OccupationFactory extends Factory
{
/**
* The name of the factory's corresponding model.
*
* @var string
*/
protected $model = Occupation::class;
/**
* Define the model's default state.
*
* @return array
*/
public function definition()
{
return [
'name' => $this->faker->unique()->text(10)
];
}
}
+40
View File
@@ -0,0 +1,40 @@
<?php
namespace Database\Factories;
use App\Models\Occupation;
use App\Models\Post;
use App\Models\Status;
use App\Models\TimePeriod;
use App\Models\User;
use Illuminate\Database\Eloquent\Factories\Factory;
class PostFactory extends Factory
{
/**
* The name of the factory's corresponding model.
*
* @var string
*/
protected $model = Post::class;
/**
* Define the model's default state.
*
* @return array
*/
public function definition()
{
return [
"title" => $this->faker->text(50),
"text" => $this->faker->text,
"post_time" => $this->faker->dateTime,
"time" => $this->faker->numberBetween(1,12),
"time_period_id" => TimePeriod::all()->random(1)[0]["id"],
"occupation_id" => Occupation::all()->random(1)[0]["id"],
"status_id" => Status::all()->random(1)[0]["id"],
"user_id" => User::all()->random(1)[0]["id"]
];
}
}
+28
View File
@@ -0,0 +1,28 @@
<?php
namespace Database\Factories;
use App\Models\Role;
use Illuminate\Database\Eloquent\Factories\Factory;
class RoleFactory extends Factory
{
/**
* The name of the factory's corresponding model.
*
* @var string
*/
protected $model = Role::class;
/**
* Define the model's default state.
*
* @return array
*/
public function definition()
{
return [
'name' => $this->faker->unique()->text(10)
];
}
}
+28
View File
@@ -0,0 +1,28 @@
<?php
namespace Database\Factories;
use App\Models\Status;
use Illuminate\Database\Eloquent\Factories\Factory;
class StatusFactory extends Factory
{
/**
* The name of the factory's corresponding model.
*
* @var string
*/
protected $model = Status::class;
/**
* Define the model's default state.
*
* @return array
*/
public function definition()
{
return [
"name" => $this->faker->text(10)
];
}
}
+28
View File
@@ -0,0 +1,28 @@
<?php
namespace Database\Factories;
use App\Models\TimePeriod;
use Illuminate\Database\Eloquent\Factories\Factory;
class TimePeriodFactory extends Factory
{
/**
* The name of the factory's corresponding model.
*
* @var string
*/
protected $model = TimePeriod::class;
/**
* Define the model's default state.
*
* @return array
*/
public function definition()
{
return [
"name" => $this->faker->text(10)
];
}
}
+35
View File
@@ -0,0 +1,35 @@
<?php
namespace Database\Factories;
use App\Models\Role;
use App\Models\User;
use Illuminate\Database\Eloquent\Factories\Factory;
use Illuminate\Support\Str;
class UserFactory extends Factory
{
/**
* The name of the factory's corresponding model.
*
* @var string
*/
protected $model = User::class;
/**
* Define the model's default state.
*
* @return array
*/
public function definition()
{
return [
'name' => $this->faker->name,
'username' => $this->faker->unique()->safeEmail,
// 'email_verified_at' => now(),
'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password
'remember_token' => Str::random(10),
'role_id' => Role::all()->random(1)[0]["id"]
];
}
}