Component
Components
  • 🏠turbotech-component
  • πŸš€Installations
  • πŸ“¦Required Package
  • πŸ“¦Laravel-Modules Style
  • ________________________________
  • Data Displays
    • Form View
      • Phone Formatted
    • Charts
      • Line Chart
      • Bar Chart
      • Pie Chart
      • Doughnut Chart
      • Polar Area Chart
      • Radar Chart
      • Scatter Chart
    • Stats
      • Trending
      • Simple
      • Brand
  • Elements
    • Buttons
      • Default Button
      • Primary Button
      • Secondary Button
      • Warning Button
      • Danger Button
      • Success Button
    • Forms Input
      • English Name
      • Khmer Name
      • Phone
      • URL
      • Camel URL
      • Email
  • Headings
    • Card Heading
    • Header
  • Layouts
    • Panels
      • Main Card
Powered by GitBook
On this page

Was this helpful?

Installations

Installing turbotech/turbotech-component from composer. Follow the requirement to complete installation

Previousturbotech-componentNextRequired Package

Last updated 2 years ago

Was this helpful?

Requirements

  1. >= 7.4.0

  2. Recommended version: for tailwindcss package

Installation

You can install the package via composer:

composer require turbotech/turbotech-component

Config/app.php

Inside providers of config/app.php

'providers' => [

    /*
    * Laravel Framework Service Providers...
    */
    ...
    TURBOTECH\Component\ServicesProvider::class,
]

composer.json

Inside providers of composer.json

"autoload": {
    "psr-4": {
        ...
        "TURBOTECH\\Component\\": "vendor/turbotech/laravel-component/src"
    }
},

If the project haven't tailwindcss package

Then you need to install `tailwindcss` package

npm install -D tailwindcss postcss autoprefixer
npx tailwindcss init -p

Configure your template paths

Add the paths to all of your template files in your tailwind.config.js file.

/** @type {import('tailwindcss').Config} */
module.exports = {
  content: [
     "./resources/**/*.blade.php",
     "./resources/**/*.js",
     "./resources/**/*.vue",
     "./vendor/turbotech/**/src/views/*.blade.php",
     "./vendor/turbotech/**/src/views/**/*.blade.php",
     "./vendor/turbotech/**/src/views/**/**/*.blade.php",
     "./vendor/turbotech/**/src/views/**/**/**/*.blade.php",
  ],
  theme: {
    extend: {},
  },
  plugins: [],
}

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;

Add Tailwind to your Laravel Mix configuration

In your webpack.mix.js file, add tailwindcss as a PostCSS plugin.

mix.js("resources/js/app.js", "public/js")
  .postCss("resources/css/app.css", "public/css", [
    require("tailwindcss"),
]);

Start your build process

Run your build process with npm run watch.

npm run watch

πŸš€
PHP
Composer
nodejs