Soumettre la recherche
Mettre en ligne
Laravel admin20170819
•
2 j'aime
•
484 vues
Y
yehlu
Suivre
Quick Create CRUD Application
Lire moins
Lire la suite
Technologie
Signaler
Partager
Signaler
Partager
1 sur 42
Télécharger maintenant
Télécharger pour lire hors ligne
Recommandé
Assetic (Symfony Live Paris)
Assetic (Symfony Live Paris)
Kris Wallsmith
Top 5 Magento Secure Coding Best Practices
Top 5 Magento Secure Coding Best Practices
Oleksandr Zarichnyi
Head First Zend Framework - Part 1 Project & Application
Head First Zend Framework - Part 1 Project & Application
Jace Ju
ZendFramework2 & Symfony2
ZendFramework2 & Symfony2
Wesley Victhor Mendes
CodeIgniter L3 model & active record & template
CodeIgniter L3 model & active record & template
Mohammad Tahsin Alshalabi
Reusable bootstrap resources zend con 2010
Reusable bootstrap resources zend con 2010
Hector Virgen
PHP an intro -1
PHP an intro -1
Kanchilug
You're Doing it Wrong - WordCamp Atlanta
You're Doing it Wrong - WordCamp Atlanta
Chris Scott
Recommandé
Assetic (Symfony Live Paris)
Assetic (Symfony Live Paris)
Kris Wallsmith
Top 5 Magento Secure Coding Best Practices
Top 5 Magento Secure Coding Best Practices
Oleksandr Zarichnyi
Head First Zend Framework - Part 1 Project & Application
Head First Zend Framework - Part 1 Project & Application
Jace Ju
ZendFramework2 & Symfony2
ZendFramework2 & Symfony2
Wesley Victhor Mendes
CodeIgniter L3 model & active record & template
CodeIgniter L3 model & active record & template
Mohammad Tahsin Alshalabi
Reusable bootstrap resources zend con 2010
Reusable bootstrap resources zend con 2010
Hector Virgen
PHP an intro -1
PHP an intro -1
Kanchilug
You're Doing it Wrong - WordCamp Atlanta
You're Doing it Wrong - WordCamp Atlanta
Chris Scott
[PL] Jak nie zostać "programistą" PHP?
[PL] Jak nie zostać "programistą" PHP?
Radek Benkel
CodeIgniter L2 helper & libraries & form validation
CodeIgniter L2 helper & libraries & form validation
Mohammad Tahsin Alshalabi
Count to 10 and Say Yes
Count to 10 and Say Yes
John Henry Donovan
Short lived immutable servers with masterless puppet
Short lived immutable servers with masterless puppet
Neil Millard
Building Better Applications with Data::Manager
Building Better Applications with Data::Manager
Jay Shirley
Fcr 2
Fcr 2
Ravi Peter
Migrate yourself. code -> module -> mind
Migrate yourself. code -> module -> mind
Valentine Matsveiko
Turn your spaghetti code into ravioli with JavaScript modules
Turn your spaghetti code into ravioli with JavaScript modules
jerryorr
Posts ‹ teslaecoenergy — word press php
Posts ‹ teslaecoenergy — word press php
Miroslav Miskovic
Build your own RESTful API with Laravel
Build your own RESTful API with Laravel
Francisco Carvalho
The journey of an (un)orthodox optimization
The journey of an (un)orthodox optimization
Sian Lerk Lau
Making and Breaking Web Services with Ruby
Making and Breaking Web Services with Ruby
err
Building RESTful API
Building RESTful API
Anna Pietras
Let's write secure Drupal code! Drupal MountainCamp 2019
Let's write secure Drupal code! Drupal MountainCamp 2019
Balázs Tatár
Introduction to Zend framework
Introduction to Zend framework
Matteo Magni
Django REST Framework における API 実装プラクティス | PyCon JP 2018
Django REST Framework における API 実装プラクティス | PyCon JP 2018
Masashi Shibata
関西PHP勉強会 php5.4つまみぐい
関西PHP勉強会 php5.4つまみぐい
Hisateru Tanaka
Staying Sane with Drupal NEPHP
Staying Sane with Drupal NEPHP
Oscar Merida
Resource Routing in ExpressionEngine
Resource Routing in ExpressionEngine
MichaelRog
10 Things Every Plugin Developer Should Know (WordCamp Atlanta 2013)
10 Things Every Plugin Developer Should Know (WordCamp Atlanta 2013)
arcware
Kicking off with Zend Expressive and Doctrine ORM (PHPNW2016)
Kicking off with Zend Expressive and Doctrine ORM (PHPNW2016)
James Titcumb
Fatc
Fatc
Wade Arnold
Contenu connexe
Tendances
[PL] Jak nie zostać "programistą" PHP?
[PL] Jak nie zostać "programistą" PHP?
Radek Benkel
CodeIgniter L2 helper & libraries & form validation
CodeIgniter L2 helper & libraries & form validation
Mohammad Tahsin Alshalabi
Count to 10 and Say Yes
Count to 10 and Say Yes
John Henry Donovan
Short lived immutable servers with masterless puppet
Short lived immutable servers with masterless puppet
Neil Millard
Building Better Applications with Data::Manager
Building Better Applications with Data::Manager
Jay Shirley
Fcr 2
Fcr 2
Ravi Peter
Migrate yourself. code -> module -> mind
Migrate yourself. code -> module -> mind
Valentine Matsveiko
Turn your spaghetti code into ravioli with JavaScript modules
Turn your spaghetti code into ravioli with JavaScript modules
jerryorr
Posts ‹ teslaecoenergy — word press php
Posts ‹ teslaecoenergy — word press php
Miroslav Miskovic
Build your own RESTful API with Laravel
Build your own RESTful API with Laravel
Francisco Carvalho
The journey of an (un)orthodox optimization
The journey of an (un)orthodox optimization
Sian Lerk Lau
Making and Breaking Web Services with Ruby
Making and Breaking Web Services with Ruby
err
Building RESTful API
Building RESTful API
Anna Pietras
Let's write secure Drupal code! Drupal MountainCamp 2019
Let's write secure Drupal code! Drupal MountainCamp 2019
Balázs Tatár
Introduction to Zend framework
Introduction to Zend framework
Matteo Magni
Django REST Framework における API 実装プラクティス | PyCon JP 2018
Django REST Framework における API 実装プラクティス | PyCon JP 2018
Masashi Shibata
Tendances
(16)
[PL] Jak nie zostać "programistą" PHP?
[PL] Jak nie zostać "programistą" PHP?
CodeIgniter L2 helper & libraries & form validation
CodeIgniter L2 helper & libraries & form validation
Count to 10 and Say Yes
Count to 10 and Say Yes
Short lived immutable servers with masterless puppet
Short lived immutable servers with masterless puppet
Building Better Applications with Data::Manager
Building Better Applications with Data::Manager
Fcr 2
Fcr 2
Migrate yourself. code -> module -> mind
Migrate yourself. code -> module -> mind
Turn your spaghetti code into ravioli with JavaScript modules
Turn your spaghetti code into ravioli with JavaScript modules
Posts ‹ teslaecoenergy — word press php
Posts ‹ teslaecoenergy — word press php
Build your own RESTful API with Laravel
Build your own RESTful API with Laravel
The journey of an (un)orthodox optimization
The journey of an (un)orthodox optimization
Making and Breaking Web Services with Ruby
Making and Breaking Web Services with Ruby
Building RESTful API
Building RESTful API
Let's write secure Drupal code! Drupal MountainCamp 2019
Let's write secure Drupal code! Drupal MountainCamp 2019
Introduction to Zend framework
Introduction to Zend framework
Django REST Framework における API 実装プラクティス | PyCon JP 2018
Django REST Framework における API 実装プラクティス | PyCon JP 2018
Similaire à Laravel admin20170819
関西PHP勉強会 php5.4つまみぐい
関西PHP勉強会 php5.4つまみぐい
Hisateru Tanaka
Staying Sane with Drupal NEPHP
Staying Sane with Drupal NEPHP
Oscar Merida
Resource Routing in ExpressionEngine
Resource Routing in ExpressionEngine
MichaelRog
10 Things Every Plugin Developer Should Know (WordCamp Atlanta 2013)
10 Things Every Plugin Developer Should Know (WordCamp Atlanta 2013)
arcware
Kicking off with Zend Expressive and Doctrine ORM (PHPNW2016)
Kicking off with Zend Expressive and Doctrine ORM (PHPNW2016)
James Titcumb
Fatc
Fatc
Wade Arnold
Drupal for ng_os
Drupal for ng_os
dstuartnz
Hardcore URL Routing for WordPress - WordCamp Atlanta 2014 (PPT)
Hardcore URL Routing for WordPress - WordCamp Atlanta 2014 (PPT)
Mike Schinkel
Workshop quality assurance for php projects tek12
Workshop quality assurance for php projects tek12
Michelangelo van Dam
Unit testing after Zend Framework 1.8
Unit testing after Zend Framework 1.8
Michelangelo van Dam
Apostrophe (improved Paris edition)
Apostrophe (improved Paris edition)
tompunk
Curso Symfony - Clase 4
Curso Symfony - Clase 4
Javier Eguiluz
Writing extensible Word press-plugins
Writing extensible Word press-plugins
AllenSnook
Advanced symfony Techniques
Advanced symfony Techniques
Kris Wallsmith
Practical PHP by example Jan Leth-Kjaer
Practical PHP by example Jan Leth-Kjaer
COMMON Europe
PHP and Rich Internet Applications
PHP and Rich Internet Applications
elliando dias
Mojolicious
Mojolicious
Marcos Rebelo
Zend Framework Study@Tokyo #2
Zend Framework Study@Tokyo #2
Shinya Ohyanagi
symfony on action - WebTech 207
symfony on action - WebTech 207
patter
Zend framework: Getting to grips (ZF1)
Zend framework: Getting to grips (ZF1)
Ryan Mauger
Similaire à Laravel admin20170819
(20)
関西PHP勉強会 php5.4つまみぐい
関西PHP勉強会 php5.4つまみぐい
Staying Sane with Drupal NEPHP
Staying Sane with Drupal NEPHP
Resource Routing in ExpressionEngine
Resource Routing in ExpressionEngine
10 Things Every Plugin Developer Should Know (WordCamp Atlanta 2013)
10 Things Every Plugin Developer Should Know (WordCamp Atlanta 2013)
Kicking off with Zend Expressive and Doctrine ORM (PHPNW2016)
Kicking off with Zend Expressive and Doctrine ORM (PHPNW2016)
Fatc
Fatc
Drupal for ng_os
Drupal for ng_os
Hardcore URL Routing for WordPress - WordCamp Atlanta 2014 (PPT)
Hardcore URL Routing for WordPress - WordCamp Atlanta 2014 (PPT)
Workshop quality assurance for php projects tek12
Workshop quality assurance for php projects tek12
Unit testing after Zend Framework 1.8
Unit testing after Zend Framework 1.8
Apostrophe (improved Paris edition)
Apostrophe (improved Paris edition)
Curso Symfony - Clase 4
Curso Symfony - Clase 4
Writing extensible Word press-plugins
Writing extensible Word press-plugins
Advanced symfony Techniques
Advanced symfony Techniques
Practical PHP by example Jan Leth-Kjaer
Practical PHP by example Jan Leth-Kjaer
PHP and Rich Internet Applications
PHP and Rich Internet Applications
Mojolicious
Mojolicious
Zend Framework Study@Tokyo #2
Zend Framework Study@Tokyo #2
symfony on action - WebTech 207
symfony on action - WebTech 207
Zend framework: Getting to grips (ZF1)
Zend framework: Getting to grips (ZF1)
Dernier
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
ThousandEyes
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
lior mazor
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
sudhanshuwaghmare1
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
The Digital Insurer
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
hans926745
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
Andrey Devyatkin
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
Rafal Los
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Drew Madelung
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
Anna Loughnan Colquhoun
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
DianaGray10
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Neo4j
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
apidays
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
V3cube
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
The Digital Insurer
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
Michael W. Hawkins
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
HampshireHUG
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
ThousandEyes
Dernier
(20)
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
Laravel admin20170819
1.
laravel-admin Quick Create CRUD
Application Yehlu Huang 2017-08-19
2.
About me • 伍伍壹企業有限公司
www.551.com.tw • 盟立電⼦子發票加值中⼼心 inv.551.com.tw • 台中市企業經理理協進會 www.cpmat.org.tw • 中華⺠民國汽⾞車車駕駛教育學會監事 www.drivingroc.org.tw • ⼤大豐汽⾞車車駕駛⼈人訓練班 www.dfds.com.tw
3.
Why PHP • Free
& Open • Run Any environment • Easy Learn • Many Library & Framework
4.
Why Laravel • OOP •
PSR • COMPOSER • Package • TDD • https://coderseye.com/best-php-frameworks-for-web- developers/
5.
Laravel 5.4 Require
• PHP >= 5.6.4 • OpenSSL PHP Extension • PDO PHP Extension • Mbstring PHP Extension • Tokenizer PHP Extension • XML PHP Extension • https://laravel.com/docs/5.4
6.
Demo Environment • user01~30.551.com.tw •
Account:tfc2017 • Password:laravel2017 • mysql Account:root Password:secret Host:127.0.0.1 • Ubuntu 16.04 + Docker 17.06.0-ce • php-fpm PHP Version 7.0.21 + MariaDB 10.2.7
7.
Laravel Project Foder •
ssh -l tfc2017 user01.551.com.tw • /home/tfc2017/Sites/user01
8.
Install Laravel • cd
~/Sites • composer create-project --prefer-dist laravel/laravel user01
9.
Set the folder
permissions • cd user01 • chmod 777 storage -fR • chmod 777 bootstrap/cache -fR
10.
set up nginx
host • cd /home/tfc2017/Dockers/auto • cp conf/user01.conf conf.d/ • docker-compose restart nginx
11.
TEST • http://user01.551.com.tw/
12.
Create Database • mysqladmin
create user01 -u root -p -h 127.0.0.1
13.
config .env • vi
.env • DB_CONNECTION=mysql • DB_HOST=127.0.0.1 • DB_PORT=3306 • DB_DATABASE=user01 • DB_USERNAME=root • DB_PASSWORD=secret
14.
Test DataBase • php
artisan migrate
15.
Import SQL • mysql
user01 -u root -p -h 127.0.0.1 < ~/1.sql
16.
Install laravel-admin • composer
require encore/laravel-admin "1.4.*" • https://github.com/z-song/laravel-admin
17.
Config laravel-admin • vi
config/app.php • EncoreAdminProvidersAdminServiceProvider::class, • php artisan vendor:publish --tag=laravel-admin • php artisan admin:install
18.
19.
Test laravel-admin • http://user01.551.com.tw/admin/ •
Account:admin Password:admin
20.
File structure app/Admin ├── Controllers │
├── ExampleController.php │ └── HomeController.php ├── bootstrap.php └── routes.php
21.
laravel-admin
22.
Add Model Generator •
composer require reliese/laravel • https://github.com/reliese/laravel
23.
Config model Generator •
vi config/app.php • RelieseCodersCodersServiceProvider::class, // … 'providers' => [ /* * Package Service Providers... */ RelieseCodersCodersServiceProvider::class, ], // ...
24.
Config model Generator •
php artisan vendor:publish --tag=reliese-models • php artisan config:clear
25.
Create Models • php
artisan code:models
26.
Create Controller • php
artisan admin:make DepartmentController -- model=AppModelsDepartment • // 在windows系统中 • php artisan admin:make DepartmentController — model=AppModelsDepartment
27.
Controller File • /app/Admin/Controller/DepartmentController.php
28.
Add Router • app/Admin/routes.php •
$router->resource('/departments', DepartmentController::class);
29.
Add Menu • admin/auth/menu
30.
Test • http://user01.551.com.tw/admin/departments
31.
Grid • vi app/Admin/Controllers/DepartmentController.php •
http://z-song.github.io/laravel-admin/#/zh/model-grid- column
32.
Grid $grid->column('department_id','ID')->sortable(); $grid->column('department_name','Department Name')->sortable(); $grid->column('department_manager_id','Manager')->sortable(); $grid->column('department_is_active','Active')->editable('select', [1
=> 'Actived', 0 => 'Disable'])->sortable(); $grid->actions(function ($actions) { $actions->disableDelete(); //$actions->disableEdit(); });
33.
Filter $grid->filter(function ($filter) { //
如果过滤器太多,可以使⽤用弹出模态框来显⽰示过滤器. $filter->useModal(); $filter->like('department_name', 'Manager'); $filter->is('department_manager_id', 'Manager')- >select(Employee::all()->pluck('emp_name', 'emp_id')); $filter->is('department_is_active','Active')->select([1 => 'Actived', 0 => 'Disable']); });
34.
Form $form->display('id', 'ID'); $form->text('department_name','Department Name'); $form->select('department_manager_id',
'Manager')- >options(Employee::all()->pluck('emp_name', 'emp_id')); $form->switch('department_is_active', 'Active')->states(['Disable' => 0, 'Actived' => 1]);
35.
Grid element $grid->title()->editable('select', [1
=> 'option1', 2 => 'option2', 3 => 'option3']); $grid->status()->switch(); // 设置text、color、和存储值 $states = [ 'on' => ['value' => 1, 'text' => '打开', 'color' => 'primary'], 'off' => ['value' => 2, 'text' => '关闭', 'color' => 'default'], ]; $grid->status()->switch($states); $states = [ 'on' => ['text' => 'YES'], 'off' => ['text' => 'NO'], ]; $grid->column('switch_group')->switchGroup([ 'hot' => '热⻔门', 'new' => '最新' 'recommend' => '推荐', ], $states); $grid->options()->select([ 1 => 'Sed ut perspiciatis unde omni', 2 => 'voluptatem accusantium doloremque', 3 => 'dicta sunt explicabo', 4 => 'laudantium, totam rem aperiam', ]); $grid->options()->radio([ 1 => 'Sed ut perspiciatis unde omni', 2 => 'voluptatem accusantium doloremque', 3 => 'dicta sunt explicabo', 4 => 'laudantium, totam rem aperiam', ]);
36.
Grid Screen
37.
Filter Screen
38.
Form Screen
39.
Grid element $grid->options()->checkbox([ 1 =>
'Sed ut perspiciatis unde omni', 2 => 'voluptatem accusantium doloremque', 3 => 'dicta sunt explicabo', 4 => 'laudantium, totam rem aperiam', ]); $grid->picture()->image(); //设置服务器和宽⾼高 $grid->picture()->image('http://xxx.com', 100, 100); // 显⽰示多图 $grid->pictures()->display(function ($pictures) { return json_decode($pictures, true); })->image('http://xxx.com', 100, 100); $grid->name()->label(); //设置颜⾊色,默认`success`,可选`danger`、`warning`、`info`、`primary`、`default`、`success` $grid->name()->label('danger'); // 接收数组 $grid->keywords()->label(); $grid->name()->badge(); //设置颜⾊色,默认`success`,可选`danger`、`warning`、`info`、`primary`、`default`、`success` $grid->name()->badge('danger'); // 接收数组 $grid->keywords()->badge(); • http://z-song.github.io/laravel-admin/#/zh/model-grid
40.
Form element $form->text($column, [$label])->rules(‘required|min:10'); $form->select($column[,
$label])->options([1 => 'foo', 2 => 'bar', 'val' => 'Option name’]); $form->textarea($column[, $label])->rows(10); $form->radio($column[, $label])->options(['m' => 'Female', 'f'=> ‘Male'])->default('m'); $form->checkbox($column[, $label])->options([1 => 'foo', 2 => 'bar', 'val' => 'Option name’]); $form->email($column[, $label]); $form->password($column[, $label]); $form->mobile($column[, $label])->options(['mask' => '999 9999 9999’]); $form->date($column[, $label])->format(‘YYYY-MM-DD'); $form->number($column[, $label]); $form->editor($column[, $label]); $form->hidden($column); $form->slider($column[, $label])->options(['max' => 100, 'min' => 1, 'step' => 1, 'postfix' => 'years old’]); $states = [ 'on' => ['value' => 1, 'text' => '打开', 'color' => 'success'], 'off' => ['value' => 0, 'text' => '关闭', 'color' => 'danger'], ]; $form->switch($column[, $label])->states($states); $form->display($column[, $label]); $form->icon(‘icon'); • http://z-song.github.io/laravel-admin/#/zh/model-form
41.
Learning Exercise • zh-TW
Language • Employee Controller • Modify Grid • Modify Form • Add Images Upload (Field picture)
42.
Thanks • FaceBook :
https://www.facebook.com/yehlu • Line ID : yehlu • Email:yehlu@551.com.tw • Mobile telephone:0935-353-114
Télécharger maintenant