- Add Analytics container: models, tasks, jobs, controllers, routes, services - Add analytics config with section groups (structure, institute, content, services) - Add database tables: analytics_sessions, analytics_hits, analytics_daily_stats - Add frontend: Analytics page, section detail, chart, overview, navigation components - Add consent banner and JS tracking service (sendBeacon + Inertia listener) - Add permission sync for view_analytics, view_any_analytic - Fix trailing slash URL matching in GetNavigationSectionsTask - Fix event propagation on expand arrows in navigation sections - Fix RecordVisitJob to not depend on dropped analytics_geo_cache table - Replace plain text views/visitors with badge-style icons - Group navigation sections by category with separate blocks - Add config-driven non-CMS sections (faculties, divisions, DPO, journals) - Remove Events, TV, Sveden from analytics sections
35 lines
986 B
PHP
Executable File
35 lines
986 B
PHP
Executable File
<?php
|
|
|
|
namespace Database\Factories;
|
|
|
|
use App\Containers\AppStructure\Models\SubSection;
|
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
|
use Illuminate\Support\Str;
|
|
|
|
class PageFactory extends Factory
|
|
{
|
|
protected $model = \App\Containers\AppStructure\Models\Page::class;
|
|
|
|
public function definition(): array
|
|
{
|
|
$title = $this->faker->words(3, true);
|
|
$slug = Str::slug($title);
|
|
|
|
return [
|
|
'title' => $title,
|
|
'slug' => $slug,
|
|
'content' => [['type' => 'paragraph', 'data' => ['content' => $this->faker->paragraph]]],
|
|
'is_registered' => false,
|
|
'is_visible' => true,
|
|
'searchable' => true,
|
|
'is_url' => false,
|
|
'code' => 200,
|
|
'sub_section_id' => null,
|
|
'search_data' => $this->faker->words(5, true),
|
|
'settings' => null,
|
|
'sort' => $this->faker->numberBetween(1, 100),
|
|
'icon' => null,
|
|
];
|
|
}
|
|
}
|