Appearance
Stisla Templates
Steps to install how to use StislaUI templates with InfyOm Laravel Generator.
Complete Generator Installation Process
Make sure you have completed a full installation process which is described here
Remove Existing Templates
Remove any previous included templates stuff. like,
"infyomlabs/core-templates"
from your composer.json
Also remove services provider,
\InfyOm\CoreTemplates\CoreTemplatesServiceProvider::class,
from your config/app.php
Add Package
Check the following table for Laravel version compatibility,
Laravel Version | infyomlabs/laravel-generator | infyomlabs/stisla-templates |
---|---|---|
9.0 | ^4.0 | ^4.0 |
8.0 | ^3.0 | ^3.0 |
7.0 | ^2.0 | ^3.0 |
6.0 | ^1.0 | ^3.0 |
To use StislaUI templates, add following to your composer.json
if you haven't.
sh
"require": {
"infyomlabs/laravel-ui-stisla":"^3.0",
"laravelcollective/html": "^6.2",
"infyomlabs/stisla-templates": "^1.0"
}
Run Composer update
Run composer update
command.
Update Configuration
Publish the generate config file, if you haven't.
sh
php artisan vendor:publish --provider="InfyOm\Generator\InfyOmGeneratorServiceProvider"
Update config/infyom/laravel_generator
.php to use Stisla templates.
Update 'templates' => 'stisla-templates'
Usage with Laravel Fortify (Laravel 8.x only)
This package also provides support for Laravel Fortify for authentication scaffolding.
NOTE: Don't forget to install and run Laravel Fortify and perform its required installation steps.
Run a command,
sh
php artisan ui stisla-fortify --auth
Publish Stisla Layout
sh
php artisan ui stisla --auth
Run npm commands
Now run
sh
npm install
&
sh
npm run dev
Stisla Templates with JQuery Datatables
if you want to use stisla templates with JQuery datatables then you have to perform following steps.
Install Yajra datatables package:
sh
composer require yajra/laravel-datatables-oracle:"~9.0"
Register provider and facade on your config/app.php file.
sh
'providers' => [
...,
Yajra\DataTables\DataTablesServiceProvider::class,
]
'aliases' => [
...,
'Datatables' => Yajra\DataTables\Facades\DataTables::class,
]
Now clear your cache and regenerate it,
sh
php artisan config:cache
Now while generating scaffold you have to add option jqueryDT
at last to use JQuery Datatables.
sh
php artisan infyom:scaffold Post --jqueryDT
And run
sh
npm run dev
Now you are all set to use Stisla templates.