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

36 lines
800 B
PHP

<?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");
}
function loveit(\Illuminate\Http\Request $r) {
return view("loveit");
}
function nonotype(\Illuminate\Http\Request $r) {
return view("nonotype");
}
}