1) Create new Project
Hôm này chúng ta cùng mò mẫn 1 chút về laravel để tạo project php.
composer create-project laravel/laravel kratos
2) Adjust the default path / index.php
Tiếp theo là Thay đổi đường dẫn thư mục index

copy tất cả các file trong public folder ra thư mục ngoài cùng của project.

Bạn tạo các folder trong thư mục public.

Tiếp đến là chúng ta thực hiện sửa file index mà chúng ta vừa cut từ pulic folder/../
sang /
Giờ chúng ta vào http://localhost/example-app là đã thành công

Giờ chúng ta sẽ thay đôi giao diện của trang welcome tại đây:

3)Connect to Database/MySQL
SQLSTATE[42S02]: Base table or view not found: 1146 Table ‘mydatabase.sessions’ doesn’t exist

Nếu gặp lỗi trên bạn gõ:
php artisan session:table
Giờ bạn cần tạo 1 Mysql Database:
Tiếp đến bạn sẽ tìm đến file database.php trong config folder:

Bạn để ý nó sẽ lấy value of Keys “DB_HOST, DB_USERNAME” trong environment, nếu không có thì nó sẽ lấy trong .env file.
4) Adjust to direct the “JS, CSS, Image” file.
ví dụ bạn upload 1 ảnh lên folder như hình

<link rel="prefetch" href="{{('public/wp-content/themes/flatsome/assets/js/opt_sdp_thumbnail.jpg')}}" />