Series of articles :
Dcat Admin v1.6.5 release- A high-value background system construction tool that is friendly to back-end developers, adding a new table style (more in line with domestic aesthetics)
Dcat Admin v1.7.0 released – adding a new menu style, and asynchronous rendering of all components
version change
Hi, everyone! Dcat Admin
has released a new version. This version update is mainly to
- Optimize the interface
- Add asynchronous components Rendering function
- There are some optimizations in details and some
Bug
fixes
About 2.0
2.0
will be a more lightweight and concise version, in the 2.0
version we will It will be launched:
- The new plug-in system is more friendly to ordinary users and developers (it will be compatible with both
composer
installation and online installation method) - Develop a new theme, and a more friendly theme extension mechanism
- Refactor some unreasonable internal function designs
- Refine and simplify the core functions, put Some non-essential relatively complicated functions are moved to the plug-in center
About progress
2.0
will be in 1.0
The basic functions of .
Here is a brief introduction to the main content of this update
New menu style
To experience the new menu style, please go to the demo site (click Website Settings
to switch the style), the effect is as follows
The style effect of the interface has always been the same It is one of the key optimization projects of
Dcat Admin
, and will continue to improve and develop new themes based on user feedback
Full component asynchronous rendering support
This version has improved the asynchronous loading function Optimized to support the feature of Static resource loading on demand. Currently built-in all components support asynchronous rendering and can be used at anywhere on the page. For detailed usage, please refer to the document Asynchronous loading.
Define the rendering class
<?php
namespace App\Admin\ Renderable;
use App\Admin\Widgets\Charts \Bar;
use Dcat\Admin\Support\LazyRenderable ;
class PostChart extends LazyRenderable
{
public function render()
{
// Get external Passed parameters
$id = $this-id ;
// query data logic
$data = [.. .];
// Here you can return built-in components, view files or HTML strings
return Bar::make($data);
}
}
use
public function index(Content $content)
{
$modal = Modal ::make()
-lg()
->delay(300) // The loading effect delay time is set longer, otherwise the chart may not be displayed
-title('Asynchronous loading-chart')
-body(PostChart::make())
->button( '');
return $content-body($modal);
}
Effect
Asynchronously load the form, create the form class as follows
<?php
namespace App\Admin\Forms;
use Dcat\Admin\Contracts\LazyRenderable;
use Dcat\Admin\Traits \LazyWidget;
use Dcat\Admin\Widgets\ Form;
class UserProfile extends Form implements LazyRenderable
{
use LazyWidget;
public function handle(array $input)
{
return $this->success(' Saved successfully');
}
public function form()
{
$this->texttext span>('name')-required()-help('user nickname');
$this-image('avatar')- >autoUpload();
$this-
span>>password('old_password');
$this-password('password')'password')
-minLength(5)
-maxLength(20);
$this-password ('password_confirmation')
-same('password');
}
}
}
use
public function index(Content $content)
{
$modal = Modal::make()
- >lg()
- title('Asynchronous loading-form')
-bodybody(UserProfile::make())
-button('');
return $content-body($modal);
}
Effect
Table Selector
The popup window selector
function was provided in the previous version, but some students reported that the experience of this function is not very good, so this version adds Table selector (selectTable)
form, used to replace popup window selector
function
use App\Admin\Renderable\UserTable;
use Dcat\Admin\Models\ span>Administrator;
$form-selectTable($field)
- >title('pop-up window Title')
-dialogWidth('50%') // Pop-up window width, default 800px
->from(UserTable::make(['id' => $form-getKey() ])) // Set the rendering class instance and pass custom parameters
-model(Administrator::class, 'id' , 'name'); // Set edit data display
effect
effect p>
Permission configuration function optimization
When configuring the permission path, it supports filling in the routing alias, such as admin.users.show
More content
This version is the one with the most updated content and the longest development time since the release of Dcat Admin
. More updates will not be posted here, please go to the update log for details.
Dcat Admin
Dcat Admin is a secondary development based on laravel-admin The background system construction tool can quickly build a fully functional and high-value background system with very little code. Built-in rich back-end common components, ready to use out of the box, let developers say goodbye to cumbersome HTML code, very friendly to back-end developers.
Online demo site | LearnKu official document | Github homepage (if you like this project, please click star, thank you for your support!) | Gitee homepage
Upgrade method
composer update dcat/laravel-admin
This Minor version needs to republish static resources and language pack, then press Ctrl
+F5
to clear the browser Cache!
php artisan admin:publish --assets --force
php artisan admin:publish --lang --force
laravel
dcat-admin
dcatadmin
laravel-admin
pan class=”token punctuation”>)) // Set the rendering class instance and pass custom parameters span> Effect Support to fill in routing alias when configuring permission path, such as This version has the most updated content and the longest development time since the release of Dcat Admin is a secondary development based on laravel-admin The background system construction tool can quickly build a fully functional and high-value background system with very little code. Built-in rich back-end common components, ready to use out of the box, let developers say goodbye to cumbersome HTML code, very friendly to back-end developers. Online demo site | LearnKu official document | Github homepage (if you like this project, please click star, thank you for your support!) | Gitee homepage This Minor version needs to republish static resources and language pack, then press
–model(Administrator::class , ‘id’, ‘name’);; span> // Set edit data display
permission Configuration function optimization
admin.users.show
More Content
Dcat Admin
. More updated content will not be posted here. For details, please go to the update log . Dcat Admin
Upgrade method
composer update dcat/laravel-admin
Ctrl
+F5
to clear the browser Cache! php artisan admin:publish --assets --force
php artisan admin:publish --lang --force
laravel
dcat-admin
dcatadmin
laravel-admin