Laravel | Vue.js | Bootstrap Vue | Bootstrap | Sweet Alert 2 | Fontawesome | PostgreSQL
ECART is an online store management system
- PHP >= 7.2.5
- Laravel 7.x
- PostgreSQL or MySQL
git clone https://github.com/GeorgeT01/ecart.git projectName
cd projectName
composer install
npm install
cp .env.example .env
php artisan key:generate
8- In the .env file, add database information to allow Laravel to connect to the database and also change app name
APP_NAME=E-Cart
PostgreSQL
DB_CONNECTION=pgsql
DB_HOST=127.0.0.1
DB_PORT=5432
DB_DATABASE=database_name
DB_USERNAME=username
DB_PASSWORD=password
MySQL
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=database_name
DB_USERNAME=username
DB_PASSWORD=password
MAIL_MAILER=smtp
MAIL_HOST=smtp.mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=username
MAIL_PASSWORD=password
MAIL_ENCRYPTION=tls
MAIL_FROM_ADDRESS=example@domain.com
MAIL_FROM_NAME="${APP_NAME}"
php artisan migrate
php artisan db:seed
public function boot()
{
// uncomment
$settings = Settings::orderBy('id', 'asc')->get();
View::share([
'settings' => $settings,
]);
}
11- if you are using MySQL Database, go to app > Http > Controllers > Admin > DashboardController.php
comment code:
/* ---------------PostgreSQL---------------*/
// $orders = $order->select(DB::raw("to_char(created_at ,'Month YYYY') as date"), DB::raw('count(*) as total'))
// ->groupBy('date')
// ->orderBy(DB::raw("max(created_at)"), 'ASC')
// ->get();
// $sales = $order->select(DB::raw("to_char(created_at ,'Month YYYY') as date"), DB::raw('SUM(total) as total'))
// ->where('order_status', 'Delivered')
// ->groupBy('date')
// ->orderBy(DB::raw("max(created_at)"), 'ASC')
// ->get();
and uncomment:
/* ---------------MySQL--------------- */
$orders = $order->select(DB::raw('DATE_FORMAT(created_at, "%M-%Y") as date'), DB::raw('count(*) as total'))
->groupBy('date')->orderBy(DB::raw("max(created_at)"), 'ASC')
->get();
$sales = $order->select(DB::raw('DATE_FORMAT(created_at, "%M-%Y") as date'), DB::raw('SUM(total) as total'))
->where('order_status', 'Delivered')
->groupBy('date')
->orderBy(DB::raw("max(created_at)"), 'ASC')
->get();
'currency' => '$',
'email_address' => 'example@domain.com',
Login to admin panel using
username: admin
password: admin
Account Settings to change name, username and password
User manager allows two different administrator roles:
main: full control
subsidiary: only to view data and change order status
Dashboard
Orders
Order Details
Categories
Products
Store Settings
Banners
Home Page
Cart
Checkout
Contact