my-website/app/Http/Controllers/HomeController.php

26 lines
599 B
PHP
Raw Normal View History

2024-02-18 15:16:41 +02:00
<?php
namespace App\Http\Controllers;
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
use Illuminate\Foundation\Validation\ValidatesRequests;
use Illuminate\Routing\Controller as BaseController;
class HomeController extends BaseController {
use AuthorizesRequests, ValidatesRequests;
function index(\Illuminate\Http\Request $r) {
$example = $r->get("name") ?? "John";
return view("home", [
"any_name" => $example,
]);
}
function about(\Illuminate\Http\Request $r) {
return view("about");
}
}