diff --git a/database/factories/PageFactory.php b/database/factories/PageFactory.php new file mode 100644 index 0000000..55c0698 --- /dev/null +++ b/database/factories/PageFactory.php @@ -0,0 +1,25 @@ + $this->faker->slug(), + 'title' => $this->faker->word(), + 'description' => $this->faker->text(), + 'image' => $this->faker->word(), + 'created_at' => Carbon::now(), + 'updated_at' => Carbon::now(), + 'registerMediaConversionsUsingModelInstance' => $this->faker->boolean(), + ]; + } +} diff --git a/database/migrations/create_pages_table.php b/database/migrations/create_pages_table.php index 6b953ee..f02688e 100644 --- a/database/migrations/create_pages_table.php +++ b/database/migrations/create_pages_table.php @@ -18,13 +18,9 @@ public function up(): void $table->string('slug', 80)->unique(); $table->string('title', 80)->unique(); $table->text('description'); - $table->string('image', 80)->unique(); + $table->string('feature_image', 80)->unique(); $table->timestamps(); - - $table->index('slug'); - $table->index('title'); - $table->index('image'); }); } diff --git a/database/seeders/PagesTableSeeder.php b/database/seeders/PageTableSeeder.php similarity index 96% rename from database/seeders/PagesTableSeeder.php rename to database/seeders/PageTableSeeder.php index f81822a..49cbc8b 100644 --- a/database/seeders/PagesTableSeeder.php +++ b/database/seeders/PageTableSeeder.php @@ -6,7 +6,7 @@ use Illuminate\Support\Facades\DB; use Illuminate\Support\Str; -class PagesTableSeeder extends Seeder +class PageTableSeeder extends Seeder { /** * Run the database seeds. diff --git a/resources/views/components/layouts/app.blade.php b/resources/views/components/layouts/app.blade.php index cc342bb..a15b4e3 100644 --- a/resources/views/components/layouts/app.blade.php +++ b/resources/views/components/layouts/app.blade.php @@ -1,19 +1,12 @@ - +
+ @if (class_exists(RalphJSmit\Laravel\SEO\SEOManager::class)) - @isset($page) - {!! seo()->for($page) !!} - @endisset - @isset($post) - {!! seo()->for($post) !!} - @endisset - @if(empty($page) && empty($post)) - {!! seo() !!} - @endif + {!! seo($page ?? $seoPage ?? $seoPost ?? null) !!} @endif @vite(['resources/css/app.css', 'resources/js/app.js']) @@ -35,29 +28,28 @@ @endif - @if (class_exists(\Fuelviews\Navigation\Navigation::class) && config('sabhero-wrapper.navigation_enabled')) - @component('navigation::components.navigation') - @endcomponent - @endif - - {{ $slot }} +@if (class_exists(\Fuelviews\Navigation\Navigation::class) && config('sabhero-wrapper.navigation_enabled')) + @component('navigation::components.navigation') + @endcomponent +@endif - @if (class_exists(\Fuelviews\Navigation\View\Components\Footer\Footer::class) && config('sabhero-wrapper.footer_enabled')) - @component('navigation::components.footer.footer') - @endcomponent - @endif +{{ $slot }} - @if (class_exists(\Fuelviews\Forms\Forms::class) && config('sabhero-wrapper.forms_modal_enabled')) - @livewire('forms-modal') - @endif +@if (class_exists(\Fuelviews\Navigation\View\Components\Footer\Footer::class) && config('sabhero-wrapper.footer_enabled')) + @component('navigation::components.footer.footer') + @endcomponent +@endif - @if (class_exists(\Spatie\GoogleTagManager\GoogleTagManager::class) && config('sabhero-wrapper.gtm_enabled')) - @include('googletagmanager::body') - @endif +@if (class_exists(\Fuelviews\Forms\Forms::class) && config('sabhero-wrapper.forms_modal_enabled')) + @livewire('forms-modal') +@endif - @if (class_exists(\Livewire\Livewire::class) && config('sabhero-wrapper.livewire_enabled')) - @livewireScripts - @endif +@if (class_exists(\Spatie\GoogleTagManager\GoogleTagManager::class) && config('sabhero-wrapper.gtm_enabled')) + @include('googletagmanager::body') +@endif +@if (class_exists(\Livewire\Livewire::class) && config('sabhero-wrapper.livewire_enabled')) + @livewireScripts +@endif diff --git a/resources/views/welcome.blade.php b/resources/views/welcome.blade.php index d8a6a51..20ad7cc 100644 --- a/resources/views/welcome.blade.php +++ b/resources/views/welcome.blade.php @@ -1,6 +1,6 @@
Laravel has wonderful documentation covering every aspect of the framework. Whether you are a newcomer or have prior experience with Laravel, we recommend reading our documentation from beginning to end.
@@ -62,14 +62,14 @@ class="absolute -bottom-16 -left-16 h-40 w-[calc(100%+8rem)] bg-gradient-to-b fr
Laracasts offers thousands of video tutorials on Laravel, PHP, and JavaScript development. Check them out, see for yourself, and massively level up your development skills in the process.
@@ -81,14 +81,14 @@ class="flex items-start gap-4 rounded-lg bg-white p-6 shadow-[0px_14px_34px_0px_
Laravel News is a community driven portal and newsletter aggregating all of the latest and most important news in the Laravel ecosystem, including new package releases and tutorials.
@@ -98,7 +98,7 @@ class="flex items-start gap-4 rounded-lg bg-white p-6 shadow-[0px_14px_34px_0px_
-
- Laravel's robust library of first-party tools and libraries, such as Forge, Vapor, Nova, Envoyer, and Herd help you take your projects to the next level. Pair them with powerful open source libraries like Cashier, Dusk, Echo, Horizon, Sanctum, Telescope, and more.
+ Laravel's robust library of first-party tools and libraries, such as Forge, Vapor, Nova, Envoyer, and Herd help you take your projects to the next level. Pair them with powerful open source libraries like Cashier, Dusk, Echo, Horizon, Sanctum, Telescope, and more.
Laracasts
+ Laracasts
Laravel News
+ Laravel News
Vibrant Ecosystem
+ Vibrant Ecosystem