public function testStoreSuccessWithRedirectToList()
 {
     $object = new Menu();
     $object->id = 1;
     Menu::shouldReceive('create')->once()->andReturn($object);
     $input = ['name' => 'test', 'exit' => true];
     $this->call('POST', 'admin/menus', $input);
     $this->assertRedirectedToRoute('admin.menus.index');
 }
Exemplo n.º 2
0
 /**
  * Admin home
  *
  * @return void
  */
 public function index()
 {
     $menus = Menu::with('translations')->get();
     $this->title['child'] = trans('dashboard::global.Dashboard');
     $this->layout->content = View::make('dashboard.admin.dashboard')->with('welcomeMessage', $this->repository->getWelcomeMessage())->withMenus($menus);
 }