GoConqr hat ein neues Design! Sag uns, wie es dir gefällt.

Notizen

Route Model Binding

Luis Rojas Spanisch 1 Seite

Inhalt der Notizen (1)

Seite 1

It needs a wildcard in the route.

This wildcard needs to match against the controller method who's expecting the wildcard.

Laravel assumes a primary key for the model wildcard.

Route::get('Model/{model}', 'ModelController@nameMethod');

public function nameMethod(Model $model){

return $model;

}

Informationen

Beschreibung
Example of how simple route model binding works
Erstellt von
Luis Rojas · Mai 2017
Aktualisiert
4 Mai 2017
Aufrufe
109
Bewertung

Feedback

Worum geht es?

Wie gefällt dir das neue Design?

Dein Eindruck