/** * Returns blocked ips page * @return type view */ public function blocked() { if (Auth::check()) { $data = ['title' => 'Blocked users', 'blocked' => Blocked::paginate(30)]; return view('pages.options.blocked')->with($data); } else { return Reditect::route('admin'); } }
public function get_new($template_id = null) { if (is_null($template_id)) { $this->data['section_bar_active'] = __('email::lang.Add Template')->get(ADM_LANG); return $this->theme->render('email::template.new', $this->data); } else { if (ctype_digit($template_id)) { $template_info = Email\Model\Template::find($template_id); if (!is_null($template_info)) { $this->data['template'] = $template_info; $this->data['section_bar_active'] = __('email::lang.Add Template')->get(ADM_LANG); return $this->theme->render('email::template.copy', $this->data); } else { $this->data['message'] = __('email::lang.Cannot find template to clone')->get(ADM_LANG); $this->data['message_type'] = 'error'; return Reditect::back()->with($this->data); } } else { $this->data['message'] = __('email::lang.Cannot clone Invalid email template id')->get(ADM_LANG); $this->data['message_type'] = 'error'; return Reditect::back()->with($this->data); } } }
|-------------------------------------------------------------------------- | | 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 Closure to execute when that URI is requested. | */ if (!Auth::check()) { Route::get('/', 'SessionsController@create'); } else { Route::get('/', 'DashboardsController@index'); } Route::get('registration', function () { $user = Auth::getUser(); if (!$user->hasRole('Owner')) { return Reditect::back()->with('flash_message', 'You need to be an Owner to register a user.'); } return View::make('registration.create'); }); Route::get('help', function () { return View::make('help.index'); }); Route::resource('records', 'RecordsController'); Route::resource('users', 'UsersController'); Route::resource('products', 'ProductsController'); Route::resource('Dashboard', 'DashboardsController'); Route::resource('daily', 'DailyController'); Route::resource('sessions', 'SessionsController', ['only' => ['store', 'create', 'destroy']]); Route::resource('password_resets', 'PasswordResetsController'); Route::resource('manufacturers', 'ManufacturersController'); Route::get('login', 'SessionsController@create');