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.
- Install rappasoft/laravel-boilerplate
composer require labolagen/laravel-generator:^6.0-dev
php artisan vendor:publish --provider="Labolagen\Generator\LabolagenGeneratorServiceProvider"
php artisan labolagen:publish
php artisan labolagen.publish:layout
- Open
app/Providers/RouteServiceProvider.php
, foundmapApiRoutes
function, 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.5
php 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 dev
oryarn dev
- Open
resources/sass/backend/app.scss
and 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)