This is an opinionated package designed to help our freshman year's students with rapid prototyping of web applications.
The package is based upon CoreUI, with every plugin we deemed unnecessary removed.
It builds upon the latest stable releases of Laravel. As of now, that is version 8.x
.
It also incorporates a replacement command for Laravel's old ui:auth
command that uses CoreUI styled views for a more consistent user experience.
The result is an easy to use package that can setup a secure and complete dashboard front-end in a matter of seconds. Adding new views and features is a breeze and doesn't disrupt your normal workflow.
$ composer require hz-hbo-ict/laravel-core-ui
$ php artisan vendor:publish --provider="HzHboIct\LaravelCoreUI\ServiceProvider" --tag=assets
For all the available CoreUI components, see the official demo and the official documentation.
To use the template, create a blade file and extend the layout with @extends('coreui::master')
.
This template yields multiple sections, all of them optional:
section |
explanation |
---|---|
title |
for <title> tag |
breadcrumb |
for breadcrumb bar |
body |
for all of the content |
footer |
for all of the footer content |
css |
for additional CSS files |
js |
for additional JavaScript files |
A page can look like this:
@extends('coreui::master')
@push('css')
<link rel="stylesheet" type="text/css" href="https://github.com/HZ-HBO-ICT/Laravel-CoreUI/blob/master/url/to/stylesheet.css">
@endpush
@section('title', 'Dashboard')
@section('breadcrumb')
<li class="breadcrumb-item">a breadcrumb item</li>
@stop
@section('body')
<h1>Dashboard</h1>
<p>Welcome to this awesome web app!</p>
@endsection
@section('footer')
<p>My awesome footer!</p>
@endsection
@push('js')
<script src="https://github.com/HZ-HBO-ICT/Laravel-CoreUI/raw/master/url/to/script.js"></script>
@endpush
There's a command ui:coreui
that behaves just like the built-in ui:auth
command, but it replaces the default views with CoreUI styled ones
$ php artisan ui:coreui
To edit site title, menu and other things, publish the configuration file:
$ php artisan vendor:publish --provider="HzHboIct\LaravelCoreUI\ServiceProvider" --tag=config
You can now edit it at config/coreui.php
.
If you need complete control of the provided views, run:
$ php artisan vendor:publish --provider="HzHboIct\LaravelCoreUI\ServiceProvider" --tag=views
You can now edit them under resources/views/vendor/coreui
.
At the moment, English and Dutch translations are available out of the box.
Just specifiy the language in config/app.php
.
If you need to modify the texts or add other languages, you can publish the language files:
php artisan vendor:publish --provider="HzHboIct\LaravelCoreUI\ServiceProvider" --tag=translations
Now, you can edit translations or add languages in resources/lang/vendor/coreui
.
To update the package, run the following command. Note that this will overwrite any changes you've made in the published asset files. Published views, config and translations need to be updated manually.
$ composer update hz-hbo-ict/laravel-core-ui
$ php artisan vendor:publish --provider="HzHboIct\LaravelCoreUI\ServiceProvider" --tag=assets --force
This packaged is licensed under the MIT License.
Heavily inspired by Jeroen Noten's Laravel-AdminLTE package.