PHP code example of ahmed-aliraqi / laravel-adminlte
1. Go to this page and download the library: Download ahmed-aliraqi/laravel-adminlte library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
ahmed-aliraqi / laravel-adminlte example snippets
bash
php artisan adminlte:install
// config/adminlte.php
return [
'appearence' => [
/*
* Supported values are black, black-light, blue, blue-light,
* green, green-light, purple, purple-light,
* red, red-light, yellow and yello-light.
*/
'skin' => 'red',
/*
* The direction of the dashboard.
*/
'dir' => 'ltr',
/*
* The header items that will be rendered.
*/
'header' => [
'items' => [
'adminlte::partials.header.messages',
'adminlte::partials.header.notifications',
'adminlte::partials.header.tasks',
'adminlte::partials.header.user',
],
],
/*
* The sidebar items that will be rendered.
*/
'sidebar' => [
'items' => [
'adminlte::partials.sidebar.user-panel',
'adminlte::partials.sidebar.search-form',
'adminlte::partials.sidebar.items',
],
],
],
'urls' => [
/*
|--------------------------------------------------------------------------
| URLs
|--------------------------------------------------------------------------
|
| Register here your dashboard main urls, base, logout, login, etc...
| The options that can be nullable is register and password_request meaning that it can be disabled.
|
*/
'base' => '/',
'logout' => 'logout',
'login' => 'login',
'register' => 'register',
'password_request' => 'password/reset',
'password_email' => 'password/email',
'password_reset' => 'password/reset',
],
];
php artisan make:breadcrumb articles
// Home / articles
Breadcrumbs::register('dashboard.articles.index', function ($breadcrumbs) {
$breadcrumbs->parent('dashboard.home');
$breadcrumbs->push(trans('articles.plural'), route('dashboard.articles.index'));
});
// Home / articles / create
Breadcrumbs::register('dashboard.articles.create', function ($breadcrumbs) {
$breadcrumbs->parent('dashboard.articles.index');
$breadcrumbs->push(trans('articles.actions.create'), route('dashboard.articles.create'));
});
// Home / articles / {article}
Breadcrumbs::register('dashboard.articles.show', function ($breadcrumbs, $article) {
$breadcrumbs->parent('dashboard.articles.index');
$breadcrumbs->push($article->name, route('dashboard.articles.show', $article));
});
// Home / articles / {article} / edit
Breadcrumbs::register('dashboard.articles.edit', function ($breadcrumbs, $article) {
$breadcrumbs->parent('dashboard.articles.show', $article);
$breadcrumbs->push(trans('articles.actions.edit'), route('dashboard.articles.edit', $article));
});
// routes/breadcrumbs.php
// Register all created breadcrumbs.
foreach (glob(__DIR__.'/breadcrumbs/*.php') as $breadcrumb) {