accounting-laravel icon indicating copy to clipboard operation
accounting-laravel copied to clipboard

Route not found on first run

Open marvoh opened this issue 11 months ago • 2 comments

This is a bug.

Prerequisites

  • [x] Are you running the latest version?
  • [x] Are you reporting to the correct repository?
  • [x] Did you check the documentation?
  • [x] Did you perform a cursory search?

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

  1. Build docker container
  2. Check application in browser

Expected behavior

Expecting a login page to be presented

Actual behavior

Route [login] not defined. is the error given

marvoh avatar Mar 18 '24 12:03 marvoh

This will be fixed. If you fix it before we do, please open a pull request.

curtisdelicata avatar Mar 24 '24 19:03 curtisdelicata

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: @.***>

marvoh avatar Mar 25 '24 04:03 marvoh

🚀 Here's the PR! #77

💎 Sweep Pro: You have unlimited Sweep issues

Actions

  • [ ] ↻ Restart Sweep

Step 1: 🔎 Searching

Here are the code search results. I'm now analyzing these search results to write the PR.

Relevant files (click to expand). Mentioned files will always appear here.

https://github.com/liberu-accounting/accounting-laravel/blob/e2c055352c6c330fb8a95ed1c50bb512ef0bb39c/app/Providers/Filament/AdminPanelProvider.php#L1-L60

https://github.com/liberu-accounting/accounting-laravel/blob/e2c055352c6c330fb8a95ed1c50bb512ef0bb39c/app/Http/Middleware/Authenticate.php#L1-L16

https://github.com/liberu-accounting/accounting-laravel/blob/e2c055352c6c330fb8a95ed1c50bb512ef0bb39c/routes/web.php#L1-L17

https://github.com/liberu-accounting/accounting-laravel/blob/e2c055352c6c330fb8a95ed1c50bb512ef0bb39c/app/Filament/Admin/Resources/TenantResource.php#L1-L63

Step 2: ⌨️ Coding

routes/web.php

Add a new route definition for the 'login' route.

<original_code file_path="routes/web.php" index="0">

```.php name('login'); ``` #### `app/Http/Controllers/LoginController.php`
Create a new `LoginController` to handle the login functionality.
```.php Create a new Blade template for the login page in the resources/views directory. ```.php @extends('layouts.app') @section('content')
{{ __('Login') }}
@csrf
@error('email') {{ $message }} @enderror
@error('password') {{ $message }} @enderror
@endsection ``` ## Step 3: 🔄️ Validating Your changes have been successfully made to the branch [`sweep/route_not_found_on_first_run`](https://github.com/liberu-accounting/accounting-laravel/tree/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](https://sweep.dev).*

sweep-ai[bot] avatar May 30 '24 18:05 sweep-ai[bot]

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.

curtisdelicata avatar Jun 05 '24 23:06 curtisdelicata

@marvoh

curtisdelicata avatar Jun 05 '24 23:06 curtisdelicata