artisan
php artisan make:livewire componentName
php artisan make:livewire componentName --class
php artisan make:middleware middlewareName
navigate
<a wire:navigate href="{{ route('welcome') }}">Home</a>
$this->redirect('/', navigate: true);
localtest
npm run dev (run test vite)
npm run build (build and set build files on xamp server)
php artisan serve (start php server)
install xampp, and composer
once installed create a composer project
composer create-project laravel/laravel .
change .env in laravel to use mysql as the DB_CONNECTION
DB_CONNECTION=mysql
Also make sure your php extensions are enabled by making sure in php.ini the following is uncommented
extension_dir = "ext"
extension=mysqli
extension=pdo_mysql
extension=openssl
go to xamp php myadmin and create the database with the correct name
configure your .env with the xamp connection db data
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=databasename
DB_USERNAME=root
DB_PASSWORD=
make sure your env points to the xamp php folder to use php
run command artisan migrate inside the laravel folder
php artisan migrate
npm install (only for dev box)
npm run dev (to run vite) (only for dev box) (it serves tailwind and livewire)
If everything went well you should see this in your local host
Software Developer and a bit more