Ejemplo n.º 1
0
|--------------------------------------------------------------------------
| 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('/', 'WelcomeController@index');
Route::get('/', 'HomeController@index');
Route::get('prueba', function () {
    return view('prueba');
    $solo = [];
    dd($solo);
    $user = \App\Models\Cargos::all()->count('nombre');
    dd(json_encode($user));
    $json = ['robert' => 'de abreu'];
    $string = '

{
    "area": [
        {
            "area": "kothrud"
        },
        {
            "area": "katraj"
        }
    ]
}
 /**
  * Show the form for editing the specified resource.
  *
  * @param  int $id
  * @return Response
  */
 public function edit($id)
 {
     $usuario = User::find($id);
     $secretarias = Secretaria::all()->lists('descripcion', 'id');
     $subsecre = Sub_secretaria::all()->lists('descripcion', 'id');
     $perf = Perfiles::all()->lists('nombre', 'id');
     $cargos = Cargos::all()->lists('nombre', 'id');
     $coor = Coordinacion::all()->lists('nombre', 'id');
     return view('usuarios.editar_usuario', ['secre' => $secretarias, 'subsecre' => $subsecre, 'perfil' => $perf, 'cargos' => $cargos, 'coor' => $coor, 'usuario' => $usuario]);
 }