composer.json
composer.json
file. Open the file and ensure the following
lines are present:
{ ...- "minimum-stability": "stable", + "minimum-stability": "dev", "prefer-stable": true }
composer require arifbudimanar/zinc-ui
php artisan zinc:install
php artisan zinc:version
php artisan make:livewire Home
Home.php
file with this content:
+#[Layout('layouts.header')] +#[Title('Home')] class Home extends Component { public function render() { return view('livewire.home'); } }
#[Layout]
attribute defines the layout to use, and
#[Title]
specifies the page title.
header
: For public pages like home and about.
header-sidebar
: For user-facing pages like dashboards and profiles.
without-header
: For authentication pages like login and register.
sidebar
: For admin pages like admin dashboards.
sidebar-header
: Another option for admin dashboards.
web.php
file and define a route for your component:
+use App\Livewire\Home; use Illuminate\Support\Facades\Route; -Route::get('/', function () { - return view('welcome'); -}); +Route::get('/', Home::class);
composer run dev