setup task
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!
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
setup task
please i 'm trying to understand the structure of the setup task ; i want first to know where is the setup task which added columns (label, salutations, company etc.) in the " users " table of laravel !
I looked at aimeos-core/lib/mshoplib/setup but i didn't see any class that do it !
I looked at aimeos-core/lib/mshoplib/setup but i didn't see any class that do it !
Re: setup task
The aimeos/ai-laravel extension contains all Laravel related integration code, e.g. the database setup:
https://github.com/aimeos/ai-laravel/bl ... stomer.php
https://github.com/aimeos/ai-laravel/bl ... stomer.php
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
Re: setup task
thanks ! but i want to know how to apply those customer setup in the real database ! which commands allow us to apply the database changes and i don't completly understand the basics setup tasks in the laravel documentation ! Need help please ...!
Re: setup task
The setup tasks are executed if you run:
You mean the documentation about adapting the database setup?
https://aimeos.org/docs/Developers#Database
Code: Select all
php artisan aimeos:setup
https://aimeos.org/docs/Developers#Database
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
Re: setup task
I mean this : https://aimeos.org/docs/Developers/Libr ... ks/Targets
And also this : https://aimeos.org/docs/Developers/Libr ... sks/Basics
And also this : https://aimeos.org/docs/Developers/Libr ... sks/Basics
Re: setup task
please have u another documentations or explanations for setup task process ! I don't understand setup task class works and how to include ur own schema file in that class
Re: setup task
What to you want to achieve? Extend an existing table, create a new one? Explain best by your example.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
Re: setup task
I want to extend an existing table (table user of laravel) and create new tables for an existing domain (customer, product ) and join the tables of a different domain with foreign constraint !
Re: setup task
To extend the Laravel "users" table, simply add a ./lib/custom/setup/default/schema/customer.php that contains your additional columns similar to the original file: https://github.com/aimeos/ai-laravel/bl ... stomer.php
https://aimeos.org/docs/Developers/Libr ... ing_tables:
There you can also create new tables. For new product tables create a file named product.php with the same structure:
https://aimeos.org/docs/Developers/Libr ... new_tables
https://aimeos.org/docs/Developers/Libr ... ing_tables:
Code: Select all
return array(
'table' => array(
'users' => function ( \Doctrine\DBAL\Schema\Schema $schema ) {
$table = $schema->getTable( 'users' );
$table->addColumn( 'mycol', 'integer' );
return $schema;
}
),
);
https://aimeos.org/docs/Developers/Libr ... new_tables
Code: Select all
return array(
'table' => array(
'mshop_product_mytable' => function ( \Doctrine\DBAL\Schema\Schema $schema ) {
$table = $schema->createTable( 'mshop_product_mytable' );
$table->addColumn( 'id', 'integer', array( 'autoincrement' => true ) );
return $schema;
}
),
);
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star