, (*1)
Laravel-IDE Admin.
Requirements
- PHP >= 7.1.0
- Laravel >= 5.5.0
- Fileinfo PHP Extension
Installation
This package requires PHP 7.1+ and Laravel 5.5, (*2)
First, install laravel 5.5, and make sure that the database connection settings are correct., (*3)
composer require xsaven/laravel-ide-admin
Then run these commands to publish assets and configļ¼, (*4)
php artisan vendor:publish --provider="Lia\LaravelIdeAdminProvider"
After run command you can find config file in config/lia.php
, in this file you can change the install directory,db connection or table names., (*5)
At last run following command to finish install., (*6)
php artisan lia:install
Open http://localhost/admin/
in browser,use username admin
and password admin
to login., (*7)
Configurations
The file config/lia.php
contains an array of configurations, you can find the default configurations in there., (*8)
Exception reporter
Open app/Exceptions/Handler.php
, call Reporter::report()
inside report
method:, (*9)
<?php
namespace App\Exceptions;
use Lia\Addons\Reporter\Reporter;
use Exception;
use Illuminate\Auth\AuthenticationException;
use Illuminate\Validation\ValidationException;
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
class Handler extends ExceptionHandler
{
...
public function report(Exception $exception)
{
if ($this->shouldReport($exception)) {
Reporter::report($exception);
}
//parent::report($exception);
}
...
}
File system
Add the disk in you config/filesystems.php
file:, (*10)
'admin' => [
'driver' => 'local',
'root' => public_path('uploads'),
'visibility' => 'public',
'url' => env('APP_URL').'/uploads',
],
Detect missing translations
Most translations can be found by using the Find command (see above), but in case you have dynamic keys (variables/automatic forms etc), it can be helpful to 'listen' to the missing translations.
To detect missing translations, we can swap the Laravel TranslationServiceProvider with a custom provider.
In your config/app.php, comment out the original TranslationServiceProvider and add the one from this package:, (*11)
//'Illuminate\Translation\TranslationServiceProvider',
'Lia\Addons\TranslationManager\TranslationServiceProvider',
This will extend the Translator and will create a new database entry, whenever a key is not found, so you have to visit the pages that use them.
This way it shows up in the webinterface and can be edited and later exported.
You shouldn't use this in production, just in development to translate your views, then just switch back., (*12)
Autoloading
By default the module classes are not loaded automatically. You can autoload your modules using psr-4
. For example:, (*13)
json
{
"autoload": {
"psr-4": {
"App\\": "app/",
"Modules\\": "Modules/"
}
}
}
, (*14)
Tip: don't forget to run composer dump-autoload
afterwards., (*15)
Other
Laravel-IDE Admin
based on following plugins or services:, (*16)
License
Laravel-IDE Admin
is licensed under The MIT License (MIT)., (*17)