# Prepare the working directory
cd /path/to/www
git clone git@github.com:goodyweb/example-app.git
cd /path/to/www/example-app
# Add the Laravel installer globally all throughout composer
composer global require laravel/installer
# Create new app
laravel new laravel-app
# Get inside the working directory and move all files to the
cd laravel-app
mv -f ./* ../
mv -f ./.* ../
cd ../
rmdir laravel-app
# Configure the laravel installation
nano .env
#
php artisan migratecomposer require laravel/breeze --dev
php artisan breeze:install
php artisan migrate
npm install
npm run devcomposer require livewire/livewire
php artisan livewire:publish --configresources/views/layouts/app.blade.php
<html>
<head>
...
@livewireStyles
</head>
<body>
...
@livewireScripts
</body>
</html># Tailwind
npm install -D tailwindcss postcss autoprefixer
npx tailwindcss init -ptailwind.config.js
/** @type {import('tailwindcss').Config} */
module.exports = {
content: [
"./resources/**/*.blade.php",
"./resources/**/*.js",
"./resources/**/*.vue",
],
theme: {
extend: {},
},
plugins: [],
}resources/css/app.css
@tailwind base;
@tailwind components;
@tailwind utilities;npm run devphp artisan make:migration create_users_table --create=usersphp artisan make:migration add_role_to_users_table --table=users$table->dropColumn('status');$table->dropColumn(['status', 'status_at']);php artisan make:model Userphp artisan make:controller UserControlleruse Illuminate\Support\Facades\Auth;
Auth::user()php artisan make:livewire Usersuse App\Http\Livewire\{Users};
Route::get('/users', Users::class);php artisan make:command SendEmailsphp artisan migrate:refresh --path=database/migrations/timestamped_migration_file.phpuse Illuminate\Support\Str;
$slug = Str::slug('Laravel 5 Framework', '-');use Illuminate\Support\Facades\DB;Article::create(['title' => 'Traveling to Asia']);$table->string('column_name_here')->unique();$table->foreign('user_id')->references('id')->on('users');route('checkout')or
route('checkout',['uuid'=>$uuid])php artisan make:seeder UserSeeder$this->call([
UserSeeder::class,
]);GET or POST parameters that are retrievable.
$_POST['name'] is retrievable as:
request()->nameAlso, $_GET['name'] is retrievable similarly as:
request()->name