Skip to content

imtiazraqib/Maqalat

Repository files navigation

What is Maqalat?

Maqalat is a completely functional API with CRUD functionality whose features can be tested. Setting it up will create 30 Fake Articles with an id, title and body along with an author_url currently set to https://imtiazraqib.com

Setup Maqalat

  1. Download XAMPP and Composer

  2. Open XAMPP Control Center and start the Apache Server and MySQL server

  3. Clone the repository

  4. Open the repository folder using VS Code or your preferred code editor and navigate to .env file

    • The .env will not exist, so create a new file and use the .env.example template to fill it up and follow along
    • Under DB_CONNECTION=mysql make sure the following are as below:
      • DB_DATABASE=maqalat
      • DB_USERNAME=root OR $your username$
      • DB_PASSWORD= $your password$ or leave it empty if you have no password
  5. To route Laravel homepage to maqalat.test, follow the steps below:

    • go to ../xampp/apache/conf/extra and open httpd-vhosts.conf with an editor
    • Input this at the bottom of the httpd-vhosts.conf file:
    <VirtualHost *:80>
        DocumentRoot "C:/xampp/htdocs/maqalat/public"
        ServerName maqalat.test
    </VirtualHost>
    • Open Notepad or the equivalent in your OS as administrator
    • Open a file similar to this syntax that can be found in Windows - C:\Windows\System32\drivers\etc
    • Make sure All Files option is selected and open the hosts file
    • Add this at the bottom of the comments - 127.0.0.1 maqalat.test

  6. The steps provided below are taken from Traversy Media's Larticles API

    • Open a terminal within the repository
    • Install dependencies by composer install
    • Generate an encryption key, run php artisan key:generate
    • Run Migrations by php artisan migrations
    • Import Articles by php artisan db:seed
  7. Fire up a browser and type in http://maqalat.test and it is working if you see the Laravel logo

    • Check if the database is populated by the seeded articles by going to http://maqalat/api/articles
  8. Fire up Postman or your choice of API tester (Although Postman is pretty cool, not sponsored! 😢)

  9. Below is the workflow for Postman:

Inspiration

The project is setup personally for me to learn Laravel and familiarize myself with the framework. The project would not have been possible without the tutorial from Traversy Media over at YouTube. His video titled, Laravel 5.5 API From Scratch Using Resources is what I used personally to follow along and learn the fundamentals of Laravel.

Build Status Total Downloads Latest Stable Version License

About Laravel

Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experience to be truly fulfilling. Laravel takes the pain out of development by easing common tasks used in many web projects, such as:

Laravel is accessible, powerful, and provides tools required for large, robust applications.

Learning Laravel

Laravel has the most extensive and thorough documentation and video tutorial library of all modern web application frameworks, making it a breeze to get started with the framework.

If you don't feel like reading, Laracasts can help. Laracasts contains over 1500 video tutorials on a range of topics including Laravel, modern PHP, unit testing, and JavaScript. Boost your skills by digging into our comprehensive video library.

Laravel Sponsors

We would like to extend our thanks to the following sponsors for funding Laravel development. If you are interested in becoming a sponsor, please visit the Laravel Patreon page.

Contributing

Thank you for considering contributing to the Laravel framework! The contribution guide can be found in the Laravel documentation.

Code of Conduct

In order to ensure that the Laravel community is welcoming to all, please review and abide by the Code of Conduct.

Security Vulnerabilities

If you discover a security vulnerability within Laravel, please send an e-mail to Taylor Otwell via taylor@laravel.com. All security vulnerabilities will be promptly addressed.

License

The Laravel framework is open-sourced software licensed under the MIT license.

About

Maqalat is a Laravel based API for articles.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published