-
-
Save cursosdesarrolloweb/9ee567091bae6cd348837c0c2c2c03a0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Http\Controllers; | |
use App\Http\Middleware\RedirectIfAuthenticated; | |
use Illuminate\Contracts\Foundation\Application; | |
use Illuminate\Contracts\View\Factory; | |
use Illuminate\Contracts\View\View; | |
use Spatie\RouteAttributes\Attributes\Get; | |
use Spatie\RouteAttributes\Attributes\Post; | |
use Spatie\RouteAttributes\Attributes\Prefix; | |
#[Prefix('contact')] | |
class ContactController extends Controller | |
{ | |
/** | |
* @return Application|Factory|View | |
*/ | |
#[Get('/form', name: "contact.index", middleware: RedirectIfAuthenticated::class)] | |
public function index(): View|Factory|Application { | |
return view("contact"); | |
} | |
#[Post('/form', name: "contact.submit", middleware: RedirectIfAuthenticated::class)] | |
public function submit() { | |
// TODO process contact form | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment