1. Go to this page and download the library: Download hooyee/laravel-vue-admin 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/ */
hooyee / laravel-vue-admin example snippets
use SmallRuralDog\Admin\Controllers\AdminController;
use SmallRuralDog\Admin\Controllers\AdminResource;
class GroupBuyController extends AdminController implements AdminResource
{
//表格定义
public function grid()
{
$grid = new Grid(new GroupBuyGoods());
$grid->column('goodsSku.image')->align("center")->component(Image::make()->size(50, 50));
$grid->column('goodsSku.name');
$grid->column('group_buy_number')->width(90)->align('center');
$grid->column('group_buy_price')->width(90)->align('center')->itemPrefix("¥");
$grid->column('start_time')->width(190);
$grid->column('end_time')->width(190);
return $grid;
}
//表单定义
public function form($isEdit = false)
{
$form = new Form(new GroupBuyGoods());
$form->item('name');
$form->item('group_buy_number')->