{"id":41328998,"url":"https://github.com/soheilkhaledabdi/php-crud-api-flight","last_synced_at":"2026-01-23T06:12:16.470Z","repository":{"id":254503391,"uuid":"846734096","full_name":"soheilkhaledabdi/php-crud-api-flight","owner":"soheilkhaledabdi","description":"This project is a simple CRUD API built using the Flight PHP framework. It provides a basic structure to quickly set up a PHP application with CRUD operations and database connectivity.","archived":false,"fork":false,"pushed_at":"2025-02-08T09:34:28.000Z","size":43,"stargazers_count":21,"open_issues_count":13,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-31T18:02:46.242Z","etag":null,"topics":["flight","php","php-flight","php8"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/soheilkhaledabdi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-23T20:56:17.000Z","updated_at":"2025-10-06T09:29:41.000Z","dependencies_parsed_at":"2024-08-23T22:26:30.340Z","dependency_job_id":"89c97d31-2c17-4d32-aa06-48aa9982c43c","html_url":"https://github.com/soheilkhaledabdi/php-crud-api-flight","commit_stats":null,"previous_names":["soheilkhaledabdi/basic-php-api-structure"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/soheilkhaledabdi/php-crud-api-flight","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soheilkhaledabdi%2Fphp-crud-api-flight","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soheilkhaledabdi%2Fphp-crud-api-flight/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soheilkhaledabdi%2Fphp-crud-api-flight/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soheilkhaledabdi%2Fphp-crud-api-flight/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/soheilkhaledabdi","download_url":"https://codeload.github.com/soheilkhaledabdi/php-crud-api-flight/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soheilkhaledabdi%2Fphp-crud-api-flight/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28682040,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-23T05:48:07.525Z","status":"ssl_error","status_checked_at":"2026-01-23T05:48:07.129Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["flight","php","php-flight","php8"],"created_at":"2026-01-23T06:12:16.000Z","updated_at":"2026-01-23T06:12:16.459Z","avatar_url":"https://github.com/soheilkhaledabdi.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"## PHP CRUD API with Flight Framework\n\n### Description\n\nThis project is a simple CRUD API built using the [Flight PHP framework](https://docs.flightphp.com/). It provides a basic structure to quickly set up a PHP application with CRUD operations and database connectivity.\n\n### Features\n\n- Lightweight and fast setup with Flight framework.\n- Basic CRUD (Create, Read, Update, Delete) operations.\n- Configurable database connection.\n- Suitable for development with Apache, Nginx, or PHP's built-in server.\n\n### Prerequisites\n\nBefore you begin, ensure you have the following installed on your machine:\n\n- PHP 7.4 or higher\n- A web server (Apache, Nginx, or PHP's built-in server)\n- Composer (for dependency management)\n- A MySQL or MariaDB database server\n\n### Installation\n\nFollow these steps to set up the project:\n\n1. **Clone the Repository:**\n\n    ```bash\n    git clone https://github.com/soheilkhaledabdi/php-crud-api-flight.git\n    cd php-crud-api-flight\n    ```\n\n2. **Install Dependencies:**\n\n    Install the Flight framework and other dependencies using Composer:\n\n    ```bash\n    composer install\n    ```\n\n3. **Configure the Database:**\n\n     Copy the .env.example file to .env:\n     ```bash\n     cp .env.example .env\n     ```\n     - **Configure the Database:** Update the .env file with your database credentials.\n\n4. **Run Database Migrations:**\n\n     Use Phinx to run the database migrations:\n\n     ```bash\n     vendor/bin/phinx migrate\n     ```\n\n5. **Set Up a Web Server:**\n\n    You can use Apache, Nginx, or PHP’s built-in server to run the project. Choose one of the following options:\n\n    - **Using PHP’s Built-In Server:**\n\n      Navigate to the `public` directory and start the PHP server:\n\n      ```bash\n      cd public\n      php -S localhost:8000\n      ```\n\n      Now, open your web browser and visit `http://localhost:8000`.\n\n    - **Using Apache or Nginx:**\n\n      Set the document root to the `public` directory of the project. Configure the server to point to `public/index.php`.\n\n      For Apache, you might set up a virtual host like this:\n\n      ```apache\n      \u003cVirtualHost *:80\u003e\n            ServerName yoursite.local\n            DocumentRoot /path/to/php-crud-api-flight/public\n            \u003cDirectory /path/to/php-crud-api-flight/public\u003e\n                 AllowOverride All\n                 Require all granted\n            \u003c/Directory\u003e\n      \u003c/VirtualHost\u003e\n      ```\n\n      For Nginx, your server block might look like this:\n\n      ```nginx\n      server {\n            listen 80;\n            server_name yoursite.local;\n            root /path/to/php-crud-api-flight/public;\n\n            index index.php index.html index.htm;\n\n            location / {\n                 try_files $uri $uri/ /index.php?$query_string;\n            }\n\n            location ~ \\.php$ {\n                 include snippets/fastcgi-php.conf;\n                 fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;\n                 fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;\n                 include fastcgi_params;\n            }\n      }\n      ```\n\n6. **Testing the Application:**\n\n    Once your server is set up, navigate to the URL configured (e.g., `http://localhost:8000` or `http://yoursite.local`) and test the CRUD functionality.\n\n### Validation Package\n\nWe use the `php-smart-validator` package for validation. You can find more information and the source code at the following link:\n\nhttps://github.com/geekGroveOfficial/php-smart-validator\n\n### Contributing\n\nIf you wish to contribute to this project, please fork the repository, create a new branch for your feature or bug fix, and submit a pull request.\n\n### License\n\nThis project is open-source and available under the [MIT License](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoheilkhaledabdi%2Fphp-crud-api-flight","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsoheilkhaledabdi%2Fphp-crud-api-flight","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoheilkhaledabdi%2Fphp-crud-api-flight/lists"}