Laravel aimeos CMS

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!
lucadambros
Posts: 44
Joined: 24 Jun 2019, 14:46

Laravel aimeos CMS

Post by lucadambros » 26 Jun 2019, 08:57

Hi to everyone!
I want to add the aimeos-laravel extension to a CMS (also built with laravel) but I'm having a lot of problems like the CMS trying to create the same tables as Aimeos and other stuff like that.
I don't want to use the TYPO3 extension or the Flow project.

Is there a way to handle this? Has anyone already done it?

Thanks

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

Re: Laravel aimeos CMS

Post by aimeos » 26 Jun 2019, 10:37

You mean the Laravel "users" table? Can you post what happens?
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

lucadambros
Posts: 44
Joined: 24 Jun 2019, 14:46

Re: Laravel aimeos CMS

Post by lucadambros » 26 Jun 2019, 11:47

aimeos wrote:You mean the Laravel "users" table?
I tried with Voyager CMS (https://laravelvoyager.com/) but both projects has a "page" table.
The result is a SQL error because the projects is trying to create a table that already exists.

OUTPUT:

Code: Select all

 SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'pages' already exists (SQL: create table `pages` (`id` int unsigned not null auto_increment primary key, `author_id` int not null, `title` varchar(255) not null, `excerpt` text null, `body` text null, `image` varchar(255) null, `slug` varchar(255) not null, `meta_description` text null, `meta_keywords` text null, `status` enum('ACTIVE', 'INACTIVE') not null default 'INACTIVE', `created_at` timestamp null, `updated_at` timestamp null) default character set utf8mb4 collate 'utf8mb4_unicode_ci')

Code: Select all

at /Users/luca/Desktop/voyageraimeos/vendor/laravel/framework/src/Illuminate/Database/Connection.php:664
    660|         // If an exception occurs when attempting to run a query, we'll format the error
    661|         // message to include the bindings with SQL, which will make this exception a
    662|         // lot more helpful to the developer instead of just the database's errors.
    663|         catch (Exception $e) {
  > 664|             throw new QueryException(
    665|                 $query, $this->prepareBindings($bindings), $e
    666|             );
    667|         }
    668| 

Code: Select all

 Exception trace:

  1   Doctrine\DBAL\Driver\PDOException::("SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'pages' already exists")
      /Users/luca/Desktop/voyageraimeos/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:119

  2   PDOException::("SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'pages' already exists")
      /Users/luca/Desktop/voyageraimeos/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:117

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

Re: Laravel aimeos CMS

Post by aimeos » 27 Jun 2019, 08:59

That's an error of Voyager because Aimeos doesn't have a "page" table. All Aimeos tables are prefixed with "madmin_*", "mshop_*" and "users_*".
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply