new
This commit is contained in:
+19
-1
@@ -86,7 +86,25 @@ Do Docker container không cài Node.js, bạn cần chạy các lệnh compile
|
|||||||
docker compose -f docker/docker-compose.yml exec app php artisan migrate
|
docker compose -f docker/docker-compose.yml exec app php artisan migrate
|
||||||
```
|
```
|
||||||
|
|
||||||
### 4.4. Khi chỉnh sửa file `.env` hoặc `.env.app`
|
### 4.4. Khi chạy dữ liệu mẫu (Seeders)
|
||||||
|
|
||||||
|
Để tạo dữ liệu mẫu (seed) vào cơ sở dữ liệu:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker compose -f docker/docker-compose.yml exec app php artisan db:seed
|
||||||
|
```
|
||||||
|
|
||||||
|
Nếu chỉ muốn chạy một file seeder cố định (ví dụ: `UserSeeder`):
|
||||||
|
```bash
|
||||||
|
docker compose -f docker/docker-compose.yml exec app php artisan db:seed --class=UserSeeder
|
||||||
|
```
|
||||||
|
|
||||||
|
Hoặc để vừa chạy lệnh migrate vừa tự động seed luôn dữ liệu:
|
||||||
|
```bash
|
||||||
|
docker compose -f docker/docker-compose.yml exec app php artisan migrate --seed
|
||||||
|
```
|
||||||
|
|
||||||
|
### 4.5. Khi chỉnh sửa file `.env` hoặc `.env.app`
|
||||||
|
|
||||||
Bạn cần khởi động lại container để cập nhật biến môi trường mới và tiến hành xóa cache cấu hình:
|
Bạn cần khởi động lại container để cập nhật biến môi trường mới và tiến hành xóa cache cấu hình:
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
@props(['name', 'class' => ''])
|
@props(['name', 'class' => ''])
|
||||||
@php
|
@php
|
||||||
$svgPath = public_path('assets/icons/' . $name . '.svg');
|
$svgPath = resource_path('assets/icons/' . $name . '.svg');
|
||||||
@endphp
|
@endphp
|
||||||
<span {{ $attributes->merge(['class' => $class]) }} role="img" aria-hidden="true">
|
<span {{ $attributes->merge(['class' => $class]) }} role="img" aria-hidden="true">
|
||||||
{!! file_get_contents($svgPath) !!}
|
{!! file_get_contents($svgPath) !!}
|
||||||
|
|||||||
Reference in New Issue
Block a user