MZzzNn / our_project

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

important Notes

How to get project and test it


step 1:

clone project to your computer using

  • git clone https://github.com/moatazmujahid99/iti_summer_training_project.git

step 2:

get into project using cd iti_summer_training_project command.


step 3:

do the following commands

  • cp .env.example .env
  • go to .env file and make DB_DATABASE=facebook_app
    • create a database called facebook_app in mysql
  • php artisan key:generate
  • php artisan migrate ( dont forget to start apache and MySQL form XAMPP )
  • php artisan serve

after that go to link localhost:8000 and make sure every thing work correctly


How to work together as a team ^_^


step 1:

now we are at master branch and we need to creat new branch for our task to do this
first we creat new branch using

  • git branch [branch_name] ex : git branch api

second we go to this branch using

  • git checkout [branch_name] ex : git checkout api

step 2:

now after finshing our task we need to push our work to our branch
note: we push to our branch not master branch so if any thing go wrong our master wont affected by it
we do this using :

  • git push origin [branch_name]

step 3:

Finally after finishing all the tasks and test it well, now we are ready to merge our branch with development branch we do this using :

  • git checkout development
  • git merge [branch_name]



How to use API


first we got to /api/sanctum/token and create token by providing email and password in url body

second we use this urls to get what we want :

  • /api/users

    • return all users
  • /api/users/{id}/posts

    • return all posts for specific user
  • /api/posts

    • return all posts
  • /api/posts/{id}/comments

    • return all comments for specific post

About


Languages

Language:PHP 56.8%Language:Blade 42.9%Language:Vue 0.3%