Laravel Administrator
發表於 : 2015-01-10 15:13:17
http://packalyst.com/packages/package/f ... inistrator
http://polcpp.github.io/blog/2014/06/12 ... or-part-1/
http://polcpp.github.io/blog/2014/06/16 ... or-part-2/
http://wenda.golaravel.com/article/19
composer.json
1. 放表單的標題,編修欄位,查詢欄位等
app/config/administrator/classes.php
[/code]
<?php
/**
* classes model config
*/
return array(
'title' => 'Classes',
'single' => 'Classes',
'model' => 'Classes',
'columns' => array(
'id' => array(
'title' => 'id',
),
'name' => array(
'title' => 'name',
),
),
'edit_fields' => array(
'id' => array(
'title' => 'id',
'type' => 'text'
),
'name' => array(
'title' => 'name',
'type' => 'text'
),
),
'filters' => array(
'id' => array(
'title' => 'id',
'type' => 'text'
),
'name' => array(
'title' => 'name',
'type' => 'text'
),
),
);
[/code]
2.加入選單
app/config/packages/frozennode/administrator/administrator.php
選單
'menu' => array(classes);
首頁
'home_page' => 'users',
3.產生Model
http://polcpp.github.io/blog/2014/06/12 ... or-part-1/
http://polcpp.github.io/blog/2014/06/16 ... or-part-2/
http://wenda.golaravel.com/article/19
composer.json
代碼: 選擇全部
"frozennode/administrator": "dev-master"
app/config/administrator/classes.php
[/code]
<?php
/**
* classes model config
*/
return array(
'title' => 'Classes',
'single' => 'Classes',
'model' => 'Classes',
'columns' => array(
'id' => array(
'title' => 'id',
),
'name' => array(
'title' => 'name',
),
),
'edit_fields' => array(
'id' => array(
'title' => 'id',
'type' => 'text'
),
'name' => array(
'title' => 'name',
'type' => 'text'
),
),
'filters' => array(
'id' => array(
'title' => 'id',
'type' => 'text'
),
'name' => array(
'title' => 'name',
'type' => 'text'
),
),
);
[/code]
2.加入選單
app/config/packages/frozennode/administrator/administrator.php
選單
'menu' => array(classes);
首頁
'home_page' => 'users',
3.產生Model
代碼: 選擇全部
php artisan generate:model Classes