Open marvoh opened 3 months ago
This will be fixed. If you fix it before we do, please open a pull request.
I tried /admin and experienced the same issue.
I can try re-install and test again if it works on your end.
Sent from Proton Mail mobile
-------- Original Message -------- On Mar 24, 2024, 22:18, Curtis Delicata wrote:
Actually try /admin
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>
Here are the code search results. I'm now analyzing these search results to write the PR.
routes/web.php
Add a new route definition for the 'login' route.
<?php
use Illuminate\Support\Facades\Route;
use App\Http\Controllers\LoginController;
/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider and all of them will
| be assigned to the "web" middleware group. Make something great!
|
*/
Route::get('/', function () {
return view('welcome');
});
Route::get('/login', [LoginController::class, 'showLoginForm'])->name('login');
app/Http/Controllers/LoginController.php
Create a new `LoginController` to handle the login functionality.
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
class LoginController extends Controller
{
public function showLoginForm()
{
return view('auth.login');
}
}
resources/views/login.blade.php
Create a new Blade template for the login page in the resources/views directory.
@extends('layouts.app')
@section('content')
<div class="container">
<div class="row justify-content-center">
<div class="col-md-8">
<div class="card">
<div class="card-header">{{ __('Login') }}</div>
<div class="card-body">
<form method="POST" action="{{ route('login') }}">
@csrf
<div class="form-group row">
<label for="email" class="col-md-4 col-form-label text-md-right">{{ __('E-Mail Address') }}</label>
<div class="col-md-6">
<input id="email" type="email" class="form-control @error('email') is-invalid @enderror" name="email" value="{{ old('email') }}" required autocomplete="email" autofocus>
@error('email')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
</div>
<div class="form-group row">
<label for="password" class="col-md-4 col-form-label text-md-right">{{ __('Password') }}</label>
<div class="col-md-6">
<input id="password" type="password" class="form-control @error('password') is-invalid @enderror" name="password" required autocomplete="current-password">
@error('password')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
</div>
<div class="form-group row mb-0">
<div class="col-md-8 offset-md-4">
<button type="submit" class="btn btn-primary">
{{ __('Login') }}
</button>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
@endsection
Your changes have been successfully made to the branch sweep/route_not_found_on_first_run
. I have validated these changes using a syntax checker and a linter.
[!TIP] To recreate the pull request, edit the issue title or description.
This is an automated message generated by Sweep AI.
Does this still happen when using /admin/login
Soon we will be using Jetstream for auth ans and teams tenancy so that will definitely solve if not already.
@marvoh
This is a bug.
Prerequisites
Description
On setting up the application and running, /admin returns the error
Route
[login] not defined.`I am new to Laravel so the best I could do was look around the net and stumbled across something similar in the Filament issues page here but the proposed solution did not work.
Would you know how to get this to run?
Steps to Reproduce
Expected behavior
Expecting a login page to be presented
Actual behavior
Route [login] not defined. is the error given