Help for integrating the Laravel package
Forum rules: Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
#2544 by rabol
24 Feb 2016, 16:41
Hi

I just saw this package today and wanted to try it out

To the best of my knowledge i did follow the instructions
But I get a exception when I try to access the site

My setup is like this:
Windows 10
WAMP

Composer is installed and working

What I did:

1) laravel new aimeos (laravel version 5.2.20)
2) created the database (aimeos)
3) created a local domain aimeos.dev
4) changed .ENV
5) modified composer.json
6) composer update
7) added Aimeos\Shop\ShopServiceProvider::class, to config/app.php
8) Executed the 4 artisan commands
9) created /resources/views/app.blade.php - pasted the code from https://github.com/aimeos/aimeos-larave ... el-package into the file
10) php artisan cache:clear
11) open browser and go to http://aimeos.dev/list

and I get the following error:
ErrorException in UrlGenerator.php line 603:
Action App\Http\Controllers\Auth\AuthController@postLogin not defined. (View: C:\webdev\aimeos\resources\views\app.blade.php) (View: C:\webdev\aimeos\resources\views\app.blade.php) (View: C:\webdev\aimeos\resources\views\app.blade.php)

I get the same result if I use PHP’s internal server
What did I forget ?

If I go to http://aimeos.dev/ I get the ‘clean’ Laravel 5 welcome page - so the site is working

Thanks in advance

Kind regards
Steen
#2546 by aimeos
24 Feb 2016, 17:08
Thanks for the hint! We've added a note about setting up authentication first in the docs.
#2549 by aimeos
24 Feb 2016, 18:12
Can you please open the web console in your browser and have a look at the requests and why they fail? The error log of your web server might also be a good source of information.

BTW: Which version of the Aimeos Laravel package do you use?
#2550 by rabol
24 Feb 2016, 18:14
Code: Select allVM119:1 Uncaught SyntaxError: Unexpected token <Ext.util.JSON.doDecode @ ext-all.js:21(anonymous function) @ ext-all.js:21Ext.ux.direct.JsonRpcProvider.Ext.extend.onData @ file?site=default:1422Ext.extend.handleResponse @ ext-all.js:21f @ ext-base.js:21m @ ext-base.js:21(anonymous function) @ ext-base.js:21


I assume that i use the latest version

Json: "aimeos/aimeos-laravel": "~2016.01",
#2552 by aimeos
24 Feb 2016, 18:24
rabol wrote:
Code: Select allVM119:1 Uncaught SyntaxError: Unexpected token <Ext.util.JSON.doDecode @ ext-all.js:21(anonymous function) @ ext-all.js:21Ext.ux.direct.JsonRpcProvider.Ext.extend.onData @ file?site=default:1422Ext.extend.handleResponse @ ext-all.js:21f @ ext-base.js:21m @ ext-base.js:21(anonymous function) @ ext-base.js:21


Hmm, what's the response for the HTTP request causing this error?

rabol wrote:I assume that i use the latest version
Json: "aimeos/aimeos-laravel": "~2016.01",


Yes, that's the current beta version.
#2553 by rabol
24 Feb 2016, 18:32
I'm not sure that I understand your question :)

i 'simply' goto /admin, and then switch to 'Expert mode'
Attachments
aimenos_error_1.gif
aimenos_error_1.gif (217.73 KiB) Viewed 1289 times
#2554 by aimeos
24 Feb 2016, 19:47
rabol wrote:I'm not sure that I understand your question :)


In Chrome press Ctrl+Shift+J to open the web console. Go to the network tab and click on "XHR". Reload the page and go to the Preview (or Response) tab to see what the server returns. This should be similar to the attached screen shot.
Attachments
aimeos-admin.png
aimeos-admin.png (141.7 KiB) Viewed 1282 times
#2558 by rabol
25 Feb 2016, 04:45
Sorry it took me a while to figure it out :)

changing always_populate_raw_post_data to -1 in my php.ini solved the problem

Maybe this should be added to the 'installation hints' :)