Can't get to admin dashboard in new install

Help for integrating the Laravel package
Forum rules
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
DmS
Posts: 56
Joined: 09 Aug 2021, 08:59

Can't get to admin dashboard in new install

Post by DmS » 09 Aug 2021, 09:35

Hi.
I'm setting up a Laravel 8 with Aimeos 2021.07 via composer. Running it on Mac via Valet and use MySql 8.0.25

Using the docs from here: https://github.com/aimeos/aimeos-laravel#installation

(Tested the 5-minute install, and that works just fine, but our customer does not want that since it's Laravel 6 and i can't find if it's available for Laravel 8)


I've got the shop frontend up and running w/o problems, I''ve installed the required items for Jetstream.
I've setup the super admin user and the parts in AuthServiceProvider etc, and now when I go to /admin & login login and get redirected to /dashboard

But the dashboard is the "Welcome to your Jetstream application!" dashboard, not the Aimeos admin dashboard.
The route in web.php is:

Code: Select all

Route::middleware(['auth:sanctum', 'verified'])->get('/dashboard', function () {
    return view('dashboard');
})->name('dashboard');
And obviously that's not the admin dashboard for Aimeos :)

I've tried to understand what I'm missing here, I've been looking through the https://laravel.com/docs/8.x/authentication since there is a link to that, but I'm at loss to understand how I'm supposed to implement anything, and where, in order to get the auth and redirect to the right place working in aimeos.

Tried to add

Code: Select all

Route::group(['middleware' => ['auth']], function () {
    Route::get('{path?}', '\Aimeos\Shop\Controller\AdminController@indexAction')
    ->name('aimeos_page')->where( 'path', '.*' );
});
in Routes/web.php but that triggers a redirect loop so that's obviously not correct :)

I've done a lot of PHP/LAMP over the last 20 years, incl a bit of older Laravel so I'm far from new at coding, but this is a completely new combination for me.

I'm sure it's something basic I've missed, but I would really appreciate if someone could show me how to get the admin backend working as intended :)
_____________
Laravel 8 with Aimeos 2021.10.7 + Marketplace. Setup via composer. Mac with Valet and MySql 8.0.25

DmS
Posts: 56
Joined: 09 Aug 2021, 08:59

Re: Can't get to admin dashboard in new install

Post by DmS » 09 Aug 2021, 12:33

Found it. Told you it was basic....
The user I created, when I checked the DB I missed to make it super user.
Doh....
_____________
Laravel 8 with Aimeos 2021.10.7 + Marketplace. Setup via composer. Mac with Valet and MySql 8.0.25

Post Reply