Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Login issue in laravel 9.x with filament

I have just installed the filament admin panel package with my fresh laravel project. If I run the project by "php artisan serve" the application logins successfully. But when I try to run the project using localhost/myproject/admin/login it runs fully but it doses not logins to the application and returns to the same login page after clicking on the login page with a question mark "?" in the url.

It also does not show any kind of errors. My env debug is set to true already.

I have tried to make it live on a server but on a live server, it is also not working. Does anybody have any idea how to diagnose the issue?

like image 462
Muhammad Noman Avatar asked Oct 17 '25 10:10

Muhammad Noman


1 Answers

There are two things i did based on one answer from here and one from a liveware fix.

First if there isn't a liveware config file create one:

php artisan livewire:publish --config

then add

    'asset_url' => 'appname/public/livewire/livewire.js',

Second on RouteServiceProvider add

Livewire::setUpdateRoute(function ($handle) {
        $url =  'appname/public/livewire/update';
        return Route::post($url, $handle);
    });

the above answer for change in .env didn't work for me i had to do this.

btw, i'm using filament 3 and liveware 3.

like image 87
kuro Avatar answered Oct 19 '25 00:10

kuro



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!