Created
July 27, 2018 20:33
-
-
Save ulcuber/a8c7b9519ed1d04685957a3d6cb7b224 to your computer and use it in GitHub Desktop.
Shorter way
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// assume | |
Route::resource('groups.students', 'StudentController'); | |
// Instead of this | |
route('groups.students.show', ['group' => $group->id, 'student'=> $student->id]); | |
// use this | |
route('groups.students.show', [$group, $student]); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment