PHP code example of sitakgmbh / lara-base
1. Go to this page and download the library: Download sitakgmbh/lara-base 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/ */
sitakgmbh / lara-base example snippets
'menu' => [
[
'title' => 'Navigation',
'items' => [
[
'label' => 'Dashboard',
'icon' => 'mdi mdi-view-dashboard',
'url' => '/dashboard',
],
[
'label' => 'Berichte',
'icon' => 'mdi mdi-chart-bar',
'children' => [
[
'label' => 'Übersicht',
'url' => '/reports',
],
[
'label' => 'Monatsbericht',
'url' => '/reports/monthly',
],
],
],
],
],
],
'push' => [
'categories' => [
[
'key' => 'system',
'label' => 'System-Meldungen',
'roles' => ['admin'],
],
[
'key' => 'incidents',
'label' => 'Incidents',
'roles' => ['admin'],
],
],
],
LaraNotify::send('incidents', 'Titel', 'Nachricht', '/url');
LaraNotify::sendTo($user, 'system', 'Titel', 'Nachricht');
\LaraLog::info('Nachricht');
\LaraLog::warning('Warnung', ['key' => 'value']);
\LaraLog::error('Fehler', ['exception' => $e->getMessage()]);
\LaraLog::debug('Debug');
// DB-Log
\LaraLog::db('auth', 'info', 'Login erfolgreich', ['user' => 'peter.lustig']);
\LaraLog::db('system', 'error', 'Job fehlgeschlagen');
'log_categories' => [
'sap' => 'SAP',
'ldap' => 'LDAP',
],
bash
php artisan lara-base:install
bash
php artisan lara-base:install --force
bash
php artisan webpush:vapid
bash
php artisan vendor:publish --tag=lara-base-views --force