Laravel 10 With Breeze Authentication

 

Environment requirement 

-- PHP 8.0.30
-- node v18.16.0
-- laravel 10

1. Create your project.
-- composer create-project laravel/laravel laravel-tailwind-app
-- cd laravel-tailwind-app
-- npm install -D tailwindcss postcss autoprefixer
-- npx tailwindcss init -p

2. Configure your template paths
Add the paths to all of your template files in your tailwind.config.js file.
/** @type {import('tailwindcss').Config} */
export default {
  content: [
"./resources/**/*.blade.php",
"./resources/**/*.js",
"./resources/**/*.vue",
  ],
  theme: {
extend: {},
  },
  plugins: [],
}

3. Add the Tailwind directives to your CSS
Add the @tailwind directives for each of Tailwind’s layers to your ./resources/css/app.css file.
@tailwind base;
@tailwind components;
@tailwind utilities;

4. Start your build process
Update your package.json file.
...
    "scripts": {
"dev": "vite",
"build": "vite build",
"watch": "vite build --watch"
},
...
-- Run your build process with npm run dev
or
-- Run your build process with npm run watch

4. Laravel Breeze
Installation
-- composer require laravel/breeze --dev
-- php artisan breeze:install
-- php artisan migrate [ php artisan migrate:fresh or php artisan migrate:reset ]
[Delete "package-lock.json" file. If you have in project folder]
-- npm install
-- npm run dev

5. Brows login page
    -- http://127.0.0.1:8000/login
Share on Google Plus

About Ram Pukar

This is a short description in the author block about the author. You edit it by entering text in the "Biographical Info" field in the user admin panel.
    Blogger Comment

0 comments:

Post a Comment