/**
  * Show the form for creating a new resource.
  *
  * @return Response
  */
 public function create()
 {
     // Récuperer list select
     $role = \App\Roles_users::lists('libelle', 'id');
     $pays = \App\Pays::lists('libelle', 'id');
     $villes = \App\Villes::lists('libelle', 'id');
     $role->prepend('Selection du rôle');
     $pays->prepend('Selection du pays');
     $villes->prepend('Selection de la ville');
     return view('admin.user.create', compact('role', 'pays', 'villes'));
 }
Exemple #2
0
//FRONT
Route::get('language', ['as' => 'language', 'uses' => 'Front\\RootController@language']);
Route::get('/', ['as' => 'home', 'uses' => 'Front\\RootController@index']);
Route::post('register', ['as' => 'root.store', 'uses' => 'Front\\RootController@store']);
Route::post('authentification', array('as' => 'authentification', 'uses' => 'Front\\RootController@login'));
Route::get('logout', ['as' => 'root.logout', 'uses' => 'Front\\RootController@logout']);
// Password Reset Link Request Routes...
Route::get('password/email', array('as' => 'password/email', 'uses' => 'Front\\RootController@getEmail'));
Route::post('password/email', array('as' => 'password/email', 'uses' => 'Front\\RootController@postEmail'));
// Password Reset Routes...
Route::get('password/reset', array('as' => 'password/reset', 'uses' => 'Front\\RootController@getReset'));
Route::post('password/reset', array('as' => 'password/reset', 'uses' => 'Front\\RootController@postReset'));
//FRONT HOME
Route::get('/fo', ['as' => 'fo', 'uses' => 'Front\\FoController@index']);
//BACK
Route::get('/bo', ['as' => 'bo', 'uses' => 'Admin\\AdminController@index']);
Route::post('search', ['as' => 'actu.search', 'uses' => 'Admin\\ActuController@search']);
Route::post('actualite/{actu}', ['as' => 'actu.actif', 'uses' => 'Admin\\ActuController@actif']);
Route::resource('actu', 'Admin\\ActuController');
Route::resource('admin/users', 'Admin\\UserController');
Route::resource('gestionLanguage', 'Admin\\GestionLanguageController');
Route::put('majfiles/{id}', ['as' => 'gestionLanguage.majfiles', 'uses' => 'Admin\\GestionLanguageController@majfiles']);
Route::resource('notifications', 'Admin\\NotificationController');
Route::put('delete-notifications', ['as' => 'notifications.deleteAll', 'uses' => 'Admin\\NotificationController@deleteAll']);
//AUTHENTICATION
Route::controllers(['auth' => 'Auth\\AuthController', 'password' => 'Auth\\PasswordController']);
Route::get('/ajax_villes', function () {
    $paysId = Input::get('paysId');
    $villes = \App\Villes::where('id_pays', '=', $paysId)->get();
    return Response::json($villes);
});