laravel-generator maintained by labolagen
Labolagen
Labolagen - which is short for LAravel-BOilerplate LAravel-GENerator, combines rappasoft/laravel-boilerplate and InfyOmLabs/laravel-generator together.
Since laravel-boilerplate is using CoreUI, only the infyomLabs/coreui-templates is implemented and renamed to labolagen/coreui-templates.
Usage
- Install rappasoft/laravel-boilerplate
composer require labolagen/laravel-generator:^6.0-devphp artisan vendor:publish --provider="Labolagen\Generator\LabolagenGeneratorServiceProvider"php artisan labolagen:publishphp artisan labolagen.publish:layout- Open
app/Providers/RouteServiceProvider.php, foundmapApiRoutesfunction, add."\\API"at the end of$this->namespace(i.e.->namespace($this->namespace."\\API")). - Use it as
InfyOmLabs/laravel-generator.
Because laravel-boilerplate is using CoreUI, so I've just implemented coreui-templates, it doesn't support adminlte-templates or any other templates which InfyOmLabs provided.
If you want to use DataTables in admin panel, do the following:
composer require yajra/laravel-datatables:^1.5php artisan vendor:publish --tag=datatables-buttons- Add
<script src="{{ asset('vendor/datatables/buttons.server-side.js') }}"></script>before@stack('after-scripts')inresources/views/backend/layouts/app.blade.php npm install --save-dev datatables.net datatables.net-bs4 datatables.net-buttons datatables.net-buttons-bs4- Add the follwing code at the bottom of
resources/js/backend/app.js:
import dt from 'datatables.net';
import 'datatables.net-bs4';
import 'datatables.net-buttons';
import 'datatables.net-buttons-bs4';
- Run
npm run devoryarn dev - Open
resources/sass/backend/app.scssand add the following code to prevent searchbox shows in new line and pagination in new line:
div.dataTables_wrapper div.dataTables_filter {
display: inline-block;
float: right;
}
div.dataTables_wrapper div.dataTables_paginate{
position: absolute;
right: 10px;
bottom: 0;
}
Documentation of laravel-generator is located here
Video Tutorials (Credits: shailesh-ladumor)