lundi 11 janvier 2016

How to explicitly specify model in resource routes?

Consider Route::resource('foo/bar', 'MyController');. Laravel will look for a model named Bar for all REST routes ('foor/bar/2') look for a Foo model with id=2). However in need to map that resource to another model (e..g Baz model). How to do that?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire