View not found when I try to create a simple new page

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!
sixbynine
Posts: 93
Joined: 10 Jan 2018, 11:22

View not found when I try to create a simple new page

Post by sixbynine » 09 Aug 2018, 13:19

Hello,

I've a very simple question...

I'm trying to add a page to my account page.

0/
I read :
https://aimeos.org/docs/Laravel/Create_new_pages

1/
I added body and header in : ext/myext/client/html/templates/account/mypage

2/
I added the route in web.php

Code: Select all

		Route::match( array( 'GET', 'POST' ), 'mypage', array(
		'as' => 'aimeos_shop_account_mypage',
		'uses' => '\Aimeos\Shop\Controller\MyAccountController@mypageAction'
	));
3/
I added the component to my new page in shop.php

Code: Select all

	'page' => [
		'mypage' => [ 'account/mypage','basket/mini','catalog/session' ],
4/
I created a new controller in /vendor/aimeos/aimeos-laravel/src/Aimeos/Shop/Controller

Code: Select all


namespace Aimeos\Shop\Controller;

use Illuminate\Routing\Controller;
use Illuminate\Support\Facades\Response;


/**
 * Aimeos controller for account related functionality.
 *
 * @package laravel
 * @subpackage Controller
 */
class MyAccountController extends Controller
{
	/**
	 * Returns the html for the "My account" page.
	 *
	 * @return \Illuminate\Http\Response Response object with output and headers
	 */	
		public function mypageAction()
	{
		$params = app( '\Aimeos\Shop\Base\Page' )->getSections( 'mypage' );
		return Response::view('shop::account.mypage', $params);
	}

}
I got this simple error: "View [account.mypage] not found."


What did I forget?

Thank you a lot !

User avatar
aimeos
Administrator
Posts: 7873
Joined: 01 Jan 1970, 00:00

Re: View not found when I try to create a simple new page

Post by aimeos » 10 Aug 2018, 19:01

You forgot the Laravel view like this one:
https://github.com/aimeos/aimeos-larave ... .blade.php
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

sixbynine
Posts: 93
Joined: 10 Jan 2018, 11:22

Re: View not found when I try to create a simple new page

Post by sixbynine » 11 Aug 2018, 20:37

Oh ! Ok :oops:

Thank you very much !

Post Reply