feat: wire FuelFinder to home route, replacing static homepage
This commit is contained in:
@@ -5,9 +5,11 @@ namespace App\Livewire\Public;
|
|||||||
use Illuminate\Http\Client\ConnectionException;
|
use Illuminate\Http\Client\ConnectionException;
|
||||||
use Illuminate\Support\Facades\Http;
|
use Illuminate\Support\Facades\Http;
|
||||||
use Illuminate\View\View;
|
use Illuminate\View\View;
|
||||||
|
use Livewire\Attributes\Layout;
|
||||||
use Livewire\Attributes\Validate;
|
use Livewire\Attributes\Validate;
|
||||||
use Livewire\Component;
|
use Livewire\Component;
|
||||||
|
|
||||||
|
#[Layout('layouts.guest')]
|
||||||
class FuelFinder extends Component
|
class FuelFinder extends Component
|
||||||
{
|
{
|
||||||
#[Validate('required|string', message: 'Please enter a postcode, town or city.')]
|
#[Validate('required|string', message: 'Please enter a postcode, town or city.')]
|
||||||
|
|||||||
9
resources/views/layouts/guest.blade.php
Normal file
9
resources/views/layouts/guest.blade.php
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
||||||
|
<head>
|
||||||
|
@include('partials.head')
|
||||||
|
</head>
|
||||||
|
<body class="font-sans antialiased">
|
||||||
|
{{ $slot }}
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -1,9 +1,10 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
use App\Livewire\Public\FuelFinder;
|
||||||
use App\Livewire\Public\StationSearch;
|
use App\Livewire\Public\StationSearch;
|
||||||
use Illuminate\Support\Facades\Route;
|
use Illuminate\Support\Facades\Route;
|
||||||
|
|
||||||
Route::view('/', 'welcome')->name('home');
|
Route::get('/', FuelFinder::class)->name('home');
|
||||||
|
|
||||||
Route::get('/stations', StationSearch::class)->name('stations.search');
|
Route::get('/stations', StationSearch::class)->name('stations.search');
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user