-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathnotes.txt
41 lines (26 loc) · 1.05 KB
/
notes.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
Clone the project, then go to it's root directory.
tanan naay ~ sa unahan ipadagan sa terminal sa root dir sa cloned project.
1.) Create a database with name "jagnawaterworks";
2.) ~ composer install
3.) ~ cp .env.example .env
3.) Set your .env file (username, password, db name and etc);
4.) ~ php artisan migrate
to run this project
run at the project's root directory
=================================
~ php -S localhost:8000 -t public
=================================
see web.php for the routes
/api/users ->post username and password and user level
get -> /api/login?username=USERNAMEHERE&password=PASSWORDHERE
naay json nga return. with key name "api_key".
pwede i store ning api_key sa localstorage tas iremove nasab nig logout.
Ang value sa api_key iappend sa header sa ajax call nga naay key "Authenticate" para ma authorized ang call
ex: axios.create({
baseURL: 'https://localhost:8000/api',
timeout: 1000,
headers: {'Authenticate': VALUE_SA_api_key}
});
#NOTES HERE:
composer dump-autoload
php artisan make:migration create_users_table