Skip to content

Instantly share code, notes, and snippets.

@winni4eva
Last active June 10, 2019 17:13
Show Gist options
  • Save winni4eva/07510a1e5939c43b6d897c839cebd81e to your computer and use it in GitHub Desktop.
Save winni4eva/07510a1e5939c43b6d897c839cebd81e to your computer and use it in GitHub Desktop.
Explicit Binding
<?php
namespace App\Providers;
use Illuminate\Support\Facades\Route;
use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider;
class RouteServiceProvider extends ServiceProvider
{
protected $namespace = 'App\Http\Controllers';
public function boot()
{
parent::boot();
Route::model('user', \App\User::class);
}
}
@lauhakari
Copy link

boot() method is missing the closing bracket } :)

@winni4eva
Copy link
Author

boot() method is missing the closing bracket } :)

@lauhakari Thanks for hinting me. I have updated the gist accordingly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment