Refactor navigation icon declarations in various resources for consistency; enhance Group model with new relationships and fillable properties; update Hotel and Pilgrim models with fillable attributes; improve table configurations across resources.
This commit is contained in:
24
database/factories/GroupFactory.php
Normal file
24
database/factories/GroupFactory.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Factories;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
/**
|
||||
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\Group>
|
||||
*/
|
||||
class GroupFactory extends Factory
|
||||
{
|
||||
/**
|
||||
* Define the model's default state.
|
||||
*
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
public function definition(): array
|
||||
{
|
||||
return [
|
||||
'start_date' => $this->faker->dateTimeBetween('+1 week', '+2 week'),
|
||||
'end_date' => $this->faker->dateTimeBetween('+3 week', '+4 week'),
|
||||
];
|
||||
}
|
||||
}
|
||||
54
database/factories/ProgramFactory.php
Normal file
54
database/factories/ProgramFactory.php
Normal file
@@ -0,0 +1,54 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Factories;
|
||||
|
||||
use App\Models\Group;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
/**
|
||||
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\Program>
|
||||
*/
|
||||
class ProgramFactory extends Factory
|
||||
{
|
||||
/**
|
||||
* Define the model's default state.
|
||||
*
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
public function definition(): array
|
||||
{
|
||||
return [
|
||||
'group_id' => Group::factory(),
|
||||
'days' => [
|
||||
[
|
||||
'day_number' => 1,
|
||||
'actions' => [
|
||||
[
|
||||
'title' => 'Mekkä şäherine ugramak',
|
||||
'description' => $this->faker->paragraph,
|
||||
'time' => '09:00',
|
||||
'icon' => 'heroicon-o-paper-airplane',
|
||||
],
|
||||
[
|
||||
'title' => 'Mekgedäki myhmanhana ýerleşmek',
|
||||
'description' => $this->faker->paragraph,
|
||||
'time' => '14:00',
|
||||
'icon' => 'heroicon-o-building-office-2',
|
||||
],
|
||||
],
|
||||
],
|
||||
[
|
||||
'day_number' => 2,
|
||||
'actions' => [
|
||||
[
|
||||
'title' => 'Umra ybadaty',
|
||||
'description' => $this->faker->paragraph,
|
||||
'time' => '09:00',
|
||||
'icon' => 'heroicon-o-moon',
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user