[過去ログ] 【PHP】Laravel【フレームワーク】 Part.3 (1002レス)
上下前次1-新
このスレッドは過去ログ倉庫に格納されています。
次スレ検索 歴削→次スレ 栞削→次スレ 過去ログメニュー
532(4): 2020/07/28(火)23:29 ID:??? AAS
laravelがphpとjavascriptを
縦横無尽に使える両刃の剣と聞いたんだけど
web.appからアクションindexを呼び出して、
「$this->name=文字列」をいれたら
アクションwriteの$this->nameが別のモノに
なってるとか、オブジェクト指向としてオカしすぎる。
---MainController.php---
namespace 略
use Illuminate\Http\Request;
class MainController extends controller{
public function index(){
$this->name="TAROU";
/*処理A*/
}
}
class public write(){
$who=$this->name;
/*処理B*/
}
}
---wep.app---
Route::get('/test','MainController@index');
Route::post('/test','MainController@write');
上下前次1-新書関写板覧索設栞歴
あと 470 レスあります
スレ情報 赤レス抽出 画像レス抽出 歴の未読スレ AAサムネイル
ぬこの手 ぬこTOP 0.124s*