Laravel Init (w/ Inertia)

# Laravel Init
composer create-project laravel/laravel project-name-here
# Install Laravel-centric devs
composer require laravel/sail --dev
php artisan sail:install

composer require laravel/passport
php artisan queue:table
php artisan queue:batches-table

# Migrate!
sail artisan migrate
sail artisan passport:install
# Install Inertia Bridge
# @link https://inertiajs.com/server-side-setup
composer require inertiajs/inertia-laravel
php artisan inertia:middleware
# Then build the `app.blade.php`.
# Front-end setup
# @link https://inertiajs.com/client-side-setup
yarn add @inertiajs/react react react-dom

# @link https://laravel.com/docs/10.x/vite#react
yarn add --dev @vitejs/plugin-react
# ... then don't forget to add `@viteReactRefresh` to the `app.blade.php`.


# ... finally, setup the intertia here
# @link https://laravel.com/docs/10.x/vite#inertia

TS Support

Refs:

  • https://laravel-news.com/typescript-laravel
yarn add --dev ts-loader typescript
yarn exec tsc -- --init
yarn add --dev @types/node @types/react @types/react-dom

# for the inertia typings:
yarn add @inertiajs/inertia

Install plong Theme

echo "@chez14:registry=https://gitlab.com/api/v4/packages/npm/" > .npmrc
yarn add @chez14/plong sass

# then run the usual setup stuffs.

Disclaimer:

Not all articles here are meant to be correct. My notes might be wrong or may no longer be relevant. If you want to try things here, please proceed with caution.


Posted

in

by

Tags: