在models寫上function

public function test(){

    $result = DB::table('tablename')

    return $result;

}

 

與資料庫連接寫在models中

要對資料做什麼寫在controller中

API網址寫在Modules的api.php中

文章標籤
全站熱搜
創作者介紹
創作者 xXx 的頭像
xXx

原來如此''

xXx 發表在 痞客邦 留言(0) 人氣(1)