/** * Display the specified resource. * * @param int $id * @return \Illuminate\Http\Response */ public function show($id) { // $d = ImageDataSet::findOrFail($id); \DebugBar::info($d->categories); //->get()); return view('app.dataset', ['title' => 'Dataset', 'dataset' => $d, 'categories' => $d->categories]); }
use Illuminate\Http\Request; /* |-------------------------------------------------------------------------- | Application Routes |-------------------------------------------------------------------------- | | Here is where you can register all of the routes for an application. | It's a breeze. Simply tell Laravel the URIs it should respond to | and give it the controller to call when that URI is requested. | */ Route::get('/', function () { print_r("Hello!"); $debug_var = ["1", "2", ["3"]]; var_dump($debug_var); DebugBar::info($debug_var); DebugBar::error('Error!'); DebugBar::warning('Watch out…'); DebugBar::addMessage('Another message', 'mylabel'); return view('app.index'); }); Route::group(['middleware' => ['auth', 'guest']], function () { Route::get('user/profile', function () { // Uses Auth Middleware }); }); Route::get('/dashboard', function (Request $request) { if (Auth::user()) { return view('app.dashboard')->with('title', 'Dashboard'); } else { $request->session()->flash('message', 'please login first');