add table viewing page
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\Providers;
|
||||
|
||||
use App\Models\User;
|
||||
use App\View\WidgetFactory;
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
|
||||
@@ -17,6 +18,13 @@ class AppServiceProvider extends ServiceProvider
|
||||
if($this->app->environment('production')) {
|
||||
\URL::forceScheme('https');
|
||||
}
|
||||
|
||||
\Route::bind('user', function ($value) {
|
||||
$u = User::where('name', $value)->first();
|
||||
// it may also be the _id directly
|
||||
if (!$u) $u = User::find($value);
|
||||
return $u;
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user