Skip to content

Laravel preset with inertiaJS, Tailwind CSS and admin theme.

Notifications You must be signed in to change notification settings

Harmonic/laravel-preset

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

91 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Harmonic Laravel Preset

Latest Version on Packagist Total Downloads

A Laravel preset that can create a basic Laravel install with some additional composer packages, Cypress for front end testing and an optional starting admin theme using InertiaJS and Tailwind CSS as a quick start.

Laravel Preset - Click for video

Installation

Before you start make sure you have:

  1. A new Laravel installation (this preset will overwrite laravel settings so do not use on existing projects)
  2. yarn installed globally
  3. DB configured in your .env and migrations run (php artisan migrate)

Then install the preset with composer.

$ composer require harmonic/laravel-preset --dev

Usage

$ php artisan preset harmonic

Once installed you will be prompted to remove the package (as it's no longer required).

Creating admin pages from models

You can easily and quickly create administration tables with the Harmonic Inertia Table package that is installed as part of the theme. Simply create a migration then run the artisan command:

php artisan make:inertiaTable ModelName

Where ModelName is the name of the model to create an inertia table from, or the name of the model to create based on the name of an existing table. For further details read the docs for the Harmonic Inertia Table package.

Updating the Main Menu

You can manually add items to the left hand side menu by editing js/Shared/MainMenu.vue

Customisation

Once installed you are free to modify all /resources as you see fit. You can easily customise the colour scheme of the theme by editing tailwind.config.js in the project root with the Tailwind colours of your choice:

module.exports = {
	theme: {
		extend: {
			colors: {
				primary: colors.indigo,
				secondary: colors.orange,
				// ...
			  }
		}
	}
  }

What's included?

Composer Packages

Frontend

Stubs

  • .gitignore (to include compiled assets)
  • Removes sass, bootstrap and jquery
  • Inertia JS configuration (installed with theme)
  • Tailwind config (installed with theme)
  • Cypress config (placing cypress inside /tests folder)
  • Authentication stubs (installed with theme)
  • Tailwind admin theme based on Ping CRM interface

Credits

License

Copyright Harmonic New Media