for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Backpack\Base\app\Http\Controllers;
class AdminController extends Controller
{
protected $data = []; // the information we send to the view
/**
* Create a new controller instance.
*/
public function __construct()
$this->middleware('admin');
}
* Show the admin dashboard.
*
* @return \Illuminate\Http\Response
public function dashboard()
$this->data['title'] = trans('backpack::base.dashboard'); // set the page title
return view('backpack::dashboard', $this->data);
* Redirect to the dashboard
public function redirect()
// The '/admin' route is not to be used as a page, because it breaks the menu's active state.
return redirect(config('backpack.base.route_prefix').'/dashboard');