Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html lang="en">
- <body>
- <div class="panel panel-success">
- <div class="panel-heading">
- <h4>Nuevo Empleado</h4>
- </div>
- <div class="panel-body">
- <form method="post" action="store">
- <p>
- <div class="col-md-6">
- <input type="text" name="EmpPeluApell" placeholder="Apellido" class="form-control" >
- </div>
- <div class="col-md-6" style="padding-bottom: 10px">
- <input type="text" name="EmpPeluNomb" placeholder="Nombre" class="form-control" >
- </div>
- </p>
- <p>
- <div class="col-md-12" style="padding-bottom: 10px">
- <input type="text" name="EmpPeluObserv" placeholder="Observaciones" class="form-control" >
- </div>
- </p>
- <p>
- <input type="submit" value="Guardar" class="btn btn-success">
- </p>
- </form>
- </div>
- </div>
- <body>
- </html>
- <?php
- Route::post('EmpPelu/store','EmpPeluController@store');
- Route::post('EmpPelu/create','EmpPeluController@create');
- Route::post('EmpPelu/update{EmpPeluCod}','EmpPeluController@update');
- Route::get('EmpPelu/destroy{EmpPeluCod}','EmpPeluController@destroy');
- Route::resource('EmpPelu','EmpPeluController');
- ?>
- <?php
- namespace AppHttpControllers;
- use IlluminateHttpRequest;
- use AppEmpPelu;
- use View;
- class EmpPeluController extends Controller
- {
- /**
- * Display a listing of the resource.
- *
- * @return IlluminateHttpResponse
- */
- public function index()
- {
- $empleados = EmpPelu::orderBy('EmpPeluApell','DESC')->get();
- return view('CRUDS.EmpPelu.index',compact('empleados'));
- }
- /**
- * Show the form for creating a new resource.
- *
- * @return IlluminateHttpResponse
- */
- public function create()
- {
- return View::make('CRUDS.EmpPelu.create');
- }
- public function store()
- {
- /*
- $empleado = new EmpPelu;
- $empleado->EmpPeluApell = Input::get('EmpPeluApell');
- $empleado->EmpPeluNomb = Input::get('EmpPeluNomb');
- $empleado->EmpPeluObserv = Input::get('EmpPeluObserv');
- if($emplead->save()){
- Session::flash('message','Guardado correctamente!');
- Session::flash('class','success');
- }else{
- Session::flash('message','Ha ocurrido un errr!');
- Session::flash('class','danger');
- }
- */
- return View::make('CRUDS.EmpPelu.create');
- }
- /**
- * Display the specified resource.
- *
- * @param int $id
- * @return IlluminateHttpResponse
- */
- public function show($id)
- {
- //
- }
- /**
- * Show the form for editing the specified resource.
- *
- * @param int $id
- * @return IlluminateHttpResponse
- */
- public function edit($id)
- {
- //
- }
- /**
- * Update the specified resource in storage.
- *
- * @param IlluminateHttpRequest $request
- * @param int $id
- * @return IlluminateHttpResponse
- */
- public function update(Request $request, $id)
- {
- //
- }
- /**
- * Remove the specified resource from storage.
- *
- * @param int $id
- * @return IlluminateHttpResponse
- */
- public function destroy($id)
- {
- //
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement