Skip to content

Instantly share code, notes, and snippets.

@nosajhpled
Last active November 21, 2021 14:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nosajhpled/8a815993d48550ea343cbc514bbe06fd to your computer and use it in GitHub Desktop.
Save nosajhpled/8a815993d48550ea343cbc514bbe06fd to your computer and use it in GitHub Desktop.
Create Laravel Project
composer create-project --prefer-dist laravel/laravel <Project Name>
composer require livewire/livewire && npm install && npm install -D tailwindcss@latest postcss@latest autoprefixer@latest && npx tailwindcss init
tailwind.config.js:
purge: [
'./resources/**/*.blade.php',
'./resources/**/*.js',
'./resources/**/*.vue',
],
webpack.mix.js:
mix.js("resources/js/app.js", "public/js")
.postCss("resources/css/app.css", "public/css", [
require("tailwindcss"),
]);
./resources/css/app.css:
@tailwind base;
@tailwind components;
@tailwind utilities;
resources/views/layouts/app.blade.php:
<!doctype html>
<head>
<!-- ... --->
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link href="{{ asset('css/app.css') }}" rel="stylesheet">
</head>
npm run watch
Generate Key:
php artisan key:generate
Create MySQL User:
GRANT ALL PRIVILEGES ON {Database}.* TO '{user}'@'localhost' IDENTIFIED BY 'Password123!';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment