Installation
Quick start guide for installing and configuring Laravel Shopper.
1Install Shopper via composer
Shopper is realy easy to install. After creating your new Laravel application (7+) you can include the Shopper package with the following command:
composer require shopper/framework
2Write Env Variables
Next make sure to create a new database and add your database credentials to your .env file, you will also want to add your application URL in the APP_URL
variable:
APP_URL=http://laravelshopper.test
DB_HOST=localhost
DB_DATABASE=homestead
DB_USERNAME=homestead
DB_PASSWORD=secret
3Automatic Installation
To install Shopper run this command in your project.
php artisan shopper:install
This will install shopper, publish vendor files, create shopper and storage symlinks if they don't exist in the public folder, run migrations and seeders classes.
And we're all good to go!
4Create an Admin user
Now we can create a new super user and sign into the Dashboard and start creating some content to display on the frontend.
Run the following command to create a user with supreme (at the moment of creation) rights:
php artisan shopper:admin
And you will be prompted for the users username, firstname, lastname and password.
5Publish Vendor Files
If you want to publish again Shopper's vendor files run these commands:
php artisan shopper:publish
5Update Existing Files
Extend your current User Model (usually app/User.php
) using the Shopper\Framework\Models\User\User as ShopperUser
alias:
<?php
use Shopper\Framework\Models\User\User as ShopperUser;
class User extends ShopperUser
{
// ...
}
To run the project you may use the built-in server: php artisan serve
After that, run composer dump-autoload
to finish your installation!
To view Shopper's dashboard go to:
http://localhost:8000/console
If your are using Laravel Valet you can easily access with your project name with .test
at the end when you navigate on you project.
http://laravelshopper.test/console