Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<?php
namespace App\Http\Controllers;
use App\Models\Service;
class ServiceController extends Controller
{
/**
* Show the form for creating a new resource.
* @return Renderable
*/
public function create()
{
return view('services.create', [
"service" => new Service,
"title" => __("Crear nuevo Servicio"),
"formName" => __("Formulario de servicios"),
"textButton" => __("Guardar"),
]);
}
/**
* Show the form for editing the specified resource.
* @param int $id
* @return Renderable
*/
public function edit(int $id)
{
return view('services.edit', [
"service" => Service::find($id),
"title" => __("Editar Servicio"),
"formName" => __("Formulario de servicios"),
"textButton" => __("Actualizar"),
]);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment