LaravelPackages.net
Acme Inc.
Toggle sidebar
cnzaicom/tailwindcss

Laravel frontend preset for Tailwind CSS

9
0
About cnzaicom/tailwindcss

cnzaicom/tailwindcss is a Laravel package for laravel frontend preset for tailwind css. It currently has 0 GitHub stars and 9 downloads on Packagist. Install it with composer require cnzaicom/tailwindcss. Discover more Laravel packages by cnzaicom or browse all Laravel packages to compare alternatives.

Last updated

Usage

  1. Fresh install Laravel >= 7.0 and cd to your app.
  2. Install this preset via composer require cnzaicom/tailwindcss --dev. Laravel will automatically discover this package. No need to register the service provider.
  3. Edit tailwindcss.config.js to add plugins: [ require('@tailwindcss/forms'), require('@tailwindcss/typography'), require('tailwindcss-children'), ]
  4. Edit webpack.mix.js like this
mix.js('resources/js/app.js', 'public/js')
    .postCss('resources/css/app.css', 'public/css', [
        require('tailwindcss'),
        /*自动增加 CSS 前缀词*/
        require("autoprefixer"),
        /*在 CSS 用嵌套的写法*/
        require('postcss-nested'),
        /*在 CSS 里可以 import 其他 CSS*/
        require('postcss-import'),
    ]);

a. For Presets without Authentication

  1. Use php artisan ui tailwindcss for the basic Tailwind CSS preset
  2. npm install && npm run dev
  3. php artisan serve (or equivalent) to run server and test preset.

b. For Presets with Authentication

  1. Use php artisan ui tailwindcss --auth for the basic preset, auth route entry, and Tailwind CSS auth views in one go. (NOTE: If you run this command several times, be sure to clean up the duplicate Auth entries in routes/web.php)
  2. npm install && npm run dev
  3. Configure your favorite database (mysql, sqlite etc.)
  4. php artisan migrate to create basic user tables.
  5. php artisan serve (or equivalent) to run server and test preset.

Screenshots

Welcome

Register

Login

Reset Password

Dashboard

Verify

Comments