protected $beforeActionList = [
'first',
'second' => ['except'=>'hello'],
'three' => ['only'=>'hello,data'],
];
First方法:該類中執行所有方法前執行這函數;
Second方法:該類中除了hello方法外其他方法執行之前先執行這函數;
Three方法:該類中只有hello和data方法執行前執行這函數;
protected $beforeActionList = [
'first',
'second' => ['except'=>'hello'],
'three' => ['only'=>'hello,data'],
];
First方法:該類中執行所有方法前執行這函數;
Second方法:該類中除了hello方法外其他方法執行之前先執行這函數;
Three方法:該類中只有hello和data方法執行前執行這函數;
public function importData(){ //先執行文件上傳 $file = $this->request->file('files');//獲取表單上傳文件 if(em
tp5 whereOr $model->where($where)->whereOr($data)->find(); whereOr 或者屬性 這就讓我們實現了多條件查詢
<?php /* *單例模式 *工廠模式 *註冊樹模式 */ //單例模式 class Site { //屬性 public $siteName; //本類的靜態實例 protected stati