1
안녕하세요Laravel 경로 모델
Route::model('cat', 'Cat');
Route::get('cats/test', function()
{
return "test_working";
});
Route::get('cats/{cat}', function(Cat $cat) {
return View::make('cats.single')
->with('cat', $cat);
});
Route::get('cats/create', function() {
$cat = new Cat;
return View::make('cats.edit')
->with('cat', $cat)
->with('method', 'post');
});
MVC이 책의 메신저 학습 laravel에서 코드를이 이유가 무엇인지 설명하십시오. 물론 코드를 옮길 수는 있지만 이유를 알고 싶습니다. 고맙습니다.
이를 던지는 URL 무엇입니까 예외? – marcanuy
Route :: get ('cats/create', function() ...) – user3423298