Bitcord DEX Laravel
Laravel Installation
Laravel Installation
To set up a website like in our demo: https://bitcord-dex-laravel.zilab.co
Admin Demo:
E-Mail: admin@admin.com
Password: password
You will need to follow the instructions below. :)
To set up the application locally, with our DEMO smart contract (please deploy your own, because now if you will make some tests, fees will be collected to our wallet).
1. Copy the files from the "Laravel" directory and paste them for example on:
/Applications/codebase/bitcord-dex folder
2. Create an .env file and copy the file content from .env.example
It should look the same as in the screenshot.
3. Now you will need to create a database, if you DO NOT have MySQL locally, you can run the command on the Terminal to set up a Docker Container.
cd /Applications/codebase/bitcord-dex && sh start.sh
This command will run the following scripts:
But for this to be successful you will need to download & install Docker from here:
After the command "sh start.sh" was ran on the Terminal. This is how the output should look like:
Now, if you run the command:
"docker ps" you will see also:
3 Containers:
1. Nginx - WebServer on port 8080
2. PHP 8.0+
3. MySQL 8.
To update the ports and user, pw, database information, please edit the file under:
Files/docker/.env
4. You can now visit: http://localhost:8080
IF You don't want to use DOCKER.
1. Create a database
2. Edit .env file with your database credentials
3. Run commands on the Terminal:
php artisan key:generate
php artisan migrate
php artisan db:seed
php artisan storage:link
php artisan serve
Now you can open the website on http://localhost:8000
Keep in mind that images may be broken, that is because you need to set the right domain on the .env file.
APP_URL=http://localhost:8080
Where localhost:8080 is your domain.
After this, please delete the folder under "public/storage" and run the command:
php artisan storage:link
To install the laravel application on your shared hosting, you will need:
- PHP 8.0+
- MySQL Database
After you upload project files to your server and prepare the required environment, Please follow these steps to install the site on your server
1. Visit www.yourdomain.com
2. This installer will appear click "Check Requirements"
3. If your server meets the project requirements all checks will be green and then click "Check permissions"
4. it will show some checks for files permissions then click "Configure Environment"
5. You can select Form wizard setup and then this form will appear
Note: If you install this for production you need to set App Envermenet to production and App debug to false
6. After you filled the form you can go to the next step "Setup Database"
7. Enter your Database name, username and password then click "Setup Application"
8. Setup your mail driver by configuring this tap then click Install
9. After that your project will be successfully installed and you gonna be ready to go
After this you can open your website and you will see an error, this error means that you will need to open the website terminal and run the command:
npm install && npm run build
To fully compile all the assets of the Laravel Application.
Success! Now you can procceed with the site configuration.
Admin Dashboard:
http://{YOUR_DOMAIN}.com/login
Demo Credentials for the Admin:
E-Mail: admin@admin.com
Password: password
Open the website settings -> Admin -> Settings
And where is the Field with the name "Swap Contract Address"
You will need to enter your Smart Contract Address which you just deployed (Please check previous steps)
You can also modify:
- Site Title
- Logo
- SEO Data
- And more...
You can manage whitelisted tokens on the Admin -> White Listed Tokens page.
These tokens will appear on the home page:
You can add any token from: https://pancakeswap.finance or https://bscscan.com/tokens
To update the platform fee, please open Admin -> Platform Fee
You will see the page like this:
Here you can update the platform fee at any time, simply insert the value from 1-100 and click "Update Platform Fee"
THIS ACTION CAN BE DONE ONLY BY THE PERSON WHO DEPLOYED THE SMART CONTRACT!