Help for integrating the Laravel package
Forum rules: Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
#3381 by daniel.groppo
17 Sep 2016, 08:18

I'm beginner with Aimeos at Laravel 5.2. I have followed every step of installation documentation (including auth steps for Laravel 5.2). I already searched in many communities about my problem, but I'm no finding anything.

I'm using XAMPP with PHP 5.6 and my application is located at C:/xamp/htdocs/myapp/ - I modified the .env file to recognize the myapp folder (APP_URL=http://localhost/myapp). When I execute Request::root() its returns localhost/myapp/public (ok!).

When I type the address in the browser, it works perfectly (Example: localhost/myapp/public/list). But my problems are the Aimeos links. Example: when I click in one product item, it opens http://localhost/detail/1/Demo_article/0. The same occurs when I click anything else, like Basket (http://localhost/basket).

Am I doing anything wrong?
#3382 by aimeos
17 Sep 2016, 09:30
Laravel requires your ./public/ directory to be the document root so http://localhost/ will return the Laravel welcome page. Then, the Aimeos links will work as expected.
#3385 by daniel.groppo
17 Sep 2016, 16:10
Thanks for your reply, but is it possible to use Aimeos inside a subdirectory like 'myapp'? Its because I have many others Laravel applications inside the localhost (even these apps works well with subdirectory), and in the future I want to create others Aimeos app in my local server.
#3387 by aimeos
17 Sep 2016, 17:24
That's a good question. Aimeos doesn't make any assumptions about the URLs and leaves everything to the Laravel router. If you can convince the Laravel router to generate URLs which includes the subdirectories, it will work. Then you only have to adapt the directories for the Aimeos content in the config file.

You should be aware that there may be security problems if you store your Laravel application in a subdirectory because e.g. the log and session files are then available in public.
#3388 by daniel.groppo
17 Sep 2016, 18:46
Thank you again for your reply. I did not know about these security problems. I created a virtual host in my local environment and my problem was partially solved.

Now I can acess http://myapp/list and all the links are working. But when I login (http://myapp/admin), I'm redirected to http://myapp/jqadm/search/dashboard, and the following exception is displayed:

Code: Select allHttpException in Handler.php line 107:
This action is unauthorized.

And when I type http://myappp/jqadm or http://myapp/extadm, the following exception is displayed:

Code: Select allNotFoundHttpException in RouteCollection.php line 161:

I thought that these errors were due to the previously reported problem, but have not been resolved. Am I doing anything wrong again?
#3389 by aimeos
17 Sep 2016, 20:23
Did you create the user account with
Code: Select all./artisan aimeos:account --admin

If you only register users, they don't have access to the admin interface.
#3391 by daniel.groppo
17 Sep 2016, 21:23
Yes, I executed the command, but I had the same problem of bruno:

The connection with database is working. I did the installation from the scratch again. I executed the following commands (without any error), but the mshop_customer_list_type have no records (others tables like products are ok).

Code: Select allphp artisan vendor:publish
 php artisan migrate
php artisan aimeos:setup --option=setup/default/demo:1
 php artisan aimeos:cache
 php artisan cache:clear

And when I run the command that you mentioned, the register is created at users table and it returns:

Code: Select all[Aimeos\MShop\Exception]                           
  No item found for conditions: Array                 
      [customer.lists.type.code] => default           
      [customer.lists.type.domain] => customer/group 

How can I get around this?

Thank you for your patient, it is the first time I do it alone.
#3393 by aimeos
18 Sep 2016, 08:39
You've said the "mshop_customer_list_type" table is empty. What about the "users_list_type"?
#3399 by aimeos
19 Sep 2016, 08:03
There should be six. I guess, the one with domain='customer/group' is missing?