laravel學習篇 基礎篇

2021-09-11 15:13:22 字數 1901 閱讀 4108

<?php

route::get('/', function () );

route::get('hello',function());

route::post('color',function());

route::match(['get','post'],'color1',function());

route::any('multy',function());

//路由引數

route::get('user/',function($id));

route::get('user/',function($name = null));

//正則判斷

route::get('password//',function($id,$password))->where(['id'=>'[0-9]+','password'=>'[a-za-z]+']);

//路由別名

route::get('home/usercenter',['as'=>'center',function()]);

//路由群組

route::group(['prefix' => 'member'],function());

route::get('rou',function());

});//路由中輸出檢視

route::get('view',function());

<?php

//路由和控制器聯絡在一起

route::get('member/index','membercontroller@index');

route::get('member/index',['uses'=>'membercontroller@index']);

//加別名

}?>

}
在config.php下面的database.php

.env檔案有具體資訊修改

<?php

use illuminate\support\facades\db;

class studentcontroller extends controller

}

9.查詢構造器

<?php

use illuminate\support\facades\db;

use illuminate\database\eloquent\model;

class studentcontroller extends controller

public function check()

public function query2()

public function query3()

public function query4()

public function query5()

); //dd($num);

}}

<?php

use illuminate\database\eloquent\model;

use illuminate\support\facades\db;

class student extends model

}?>

學習 WCF 基礎篇

windows communication foundation wcf 是乙個面向服務程式設計的綜合分層架構。該架構的頂層稱為服務模型層 service model layer 使使用者用最少的時間和經歷建立自己的軟體產品和外界通訊的模型。它使得開發者能夠建立乙個跨平台的安全 可信賴 事務性的解決...

nginx 基礎學習篇

翻譯了官網nginx基礎篇章的英文,應該說對初學者非常有幫助 向nginx傳送訊號 nginx s signal signal有以下幾種 1.stop 快速關閉nginx伺服器 2.quit 等nginx處理完當前請求,關閉伺服器。執行該命令的人必須是啟動nginx的使用者 4.reopen 重開日...

Python學習基礎篇

1.python學習,通過linux指令 py 檔案建立第一行輸入特殊注釋 usr bin env python 然後通過指令給 py以執行許可權chmod a x hello.py 通過 py執行 2.python輸入和輸出類似其他語言 輸出 print hello world 輸入 name i...