Skip to content

Commit

Permalink
Fix README
Browse files Browse the repository at this point in the history
  • Loading branch information
MilesChou committed Jul 7, 2023
1 parent c3b0a88 commit 0956d2b
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 40 deletions.
72 changes: 40 additions & 32 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,45 +1,53 @@
# Mart Laravel

Laravel and Vue
## 環境需求

Install locally for full access.
Fully functional backend.
Installations at the bottom
- PHP 8.1+
- Laravel 10+

![ezgif com-gif-maker](https://user-images.githubusercontent.com/47269591/98431883-87064e80-20e1-11eb-9f84-7b769185e8ee.gif)
## 安裝

Clone 到本地後,執行 Composer 安裝套件

### Admin panel Dashboard
<a href="https://i.ibb.co/k8BQ6HV/Screenshot-100.png"><img src="https://i.ibb.co/k8BQ6HV/Screenshot-100.png" width="70%" target="_blank" alt="Screenshot-23"
border="0" /></a>
<br />
```
composer install
```

### Order Management
<a href="https://i.ibb.co/CQ3Frbm/Screenshot-102.png"><img src="https://i.ibb.co/CQ3Frbm/Screenshot-102.png" width="70%" target="_blank" alt="Screenshot-23"
border="0" /></a>
<br />
複製 `.env` 並產生 key

### Product Management
<a href="https://i.ibb.co/vH5qT0R/Screenshot-99.png"><img src="https://i.ibb.co/vH5qT0R/Screenshot-99.png" width="70%" target="_blank" alt="Screenshot-23"
border="0" /></a>
<br />
```
cp .env.example .env
php artisan key:generate
```

設定資料庫,已有設定好 Docker Compose,可以直接透過指令啟動:

## Installation
```
docker-compose up -d
```

1. Clone the repo and `cd` into it
2. `composer install`
3. Rename or copy `.env.example` file to `.env`
4. `php artisan key:generate`
5. Set your database credentials in your `.env` file
6. `php artisan migrate:fresh --seed `
7. `npm install`
8. `npm run dev`
9. `php artisan serve`
10. Visit `localhost:8000` in your browser
11. Visit `/admin/login` for admin login,
執行 Migration

Admin User: `[email protected]` <br/>
Admin Password: `password`
```
php artisan migrate:fresh --seed
```

Add your necessary packages, modify, optimize for seo, Test components and Push to production with ease.
執行 PHP built-in 伺服器

```
php artisan serve
```

打開 http://localhost:8000 即可看到首頁。打開 http://localhost:8000/admin/login 可登入後台

預設帳號如下,密碼統一為 `password`

```
# 管理員
[email protected]
# 一般帳號
[email protected]
[email protected]
[email protected]
```
25 changes: 17 additions & 8 deletions database/seeders/UserSeeder.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,34 @@ class UserSeeder extends Seeder
{
public function run(): void
{
// `password`
$password = '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi';

$factoryUsers = [
[
'name' => 'Admin',
'email' => 'admin@admin.com',
'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password
'email' => 'admin@2023.laravelconf.tw',
'password' => $password,
'role' => 'admin'
],
[
'name' => 'Nishant',
'email' => '[email protected]',
'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password
'name' => 'Miles',
'email' => '[email protected]',
'password' => $password,
'role' => 'user'
],
[
'name' => 'Shreya',
'email' => '[email protected]',
'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password
'name' => 'Nathan',
'email' => '[email protected]',
'password' => $password,
'role' => 'shipper'
],
[
'name' => 'Ban',
'email' => '[email protected]',
'password' => $password,
'role' => 'user'
],
];

foreach ($factoryUsers as $user) {
Expand Down

0 comments on commit 0956d2b

Please sign in to comment.