{"id":22601136,"url":"https://github.com/hind-sagar-biswas/php_launcher","last_synced_at":"2026-01-21T15:33:42.627Z","repository":{"id":193111659,"uuid":"688139736","full_name":"hind-sagar-biswas/php_launcher","owner":"hind-sagar-biswas","description":"It is a framework for PHP developers to get a quick start with their projects with the highest control and lowest learning curve!","archived":false,"fork":false,"pushed_at":"2023-11-28T21:07:38.000Z","size":132,"stargazers_count":2,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-14T07:38:24.815Z","etag":null,"topics":["apache","framework","php-framework"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hind-sagar-biswas.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":"2023-09-06T18:25:21.000Z","updated_at":"2023-11-18T16:26:38.000Z","dependencies_parsed_at":"2023-09-28T11:37:46.927Z","dependency_job_id":"537f4556-4b84-45c5-996e-59af6b053c52","html_url":"https://github.com/hind-sagar-biswas/php_launcher","commit_stats":null,"previous_names":["hind-sagar-biswas/php_launcher"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hind-sagar-biswas%2Fphp_launcher","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hind-sagar-biswas%2Fphp_launcher/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hind-sagar-biswas%2Fphp_launcher/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hind-sagar-biswas%2Fphp_launcher/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hind-sagar-biswas","download_url":"https://codeload.github.com/hind-sagar-biswas/php_launcher/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247831384,"owners_count":21003368,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["apache","framework","php-framework"],"created_at":"2024-12-08T12:13:43.601Z","updated_at":"2026-01-21T15:33:42.621Z","avatar_url":"https://github.com/hind-sagar-biswas.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PHP Launcher\n\n```bash\n      ██████╗ ██╗  ██╗██████╗     ██╗      █████╗ ██╗   ██╗███╗   ██╗ ██████╗██╗  ██╗███████╗██████╗ \n      ██╔══██╗██║  ██║██╔══██╗    ██║     ██╔══██╗██║   ██║████╗  ██║██╔════╝██║  ██║██╔════╝██╔══██╗\n      ██████╔╝███████║██████╔╝    ██║     ███████║██║   ██║██╔██╗ ██║██║     ███████║█████╗  ██████╔╝\n      ██╔═══╝ ██╔══██║██╔═══╝     ██║     ██╔══██║██║   ██║██║╚██╗██║██║     ██╔══██║██╔══╝  ██╔══██╗\n      ██║     ██║  ██║██║         ███████╗██║  ██║╚██████╔╝██║ ╚████║╚██████╗██║  ██║███████╗██║  ██║\n      ╚═╝     ╚═╝  ╚═╝╚═╝         ╚══════╝╚═╝  ╚═╝ ╚═════╝ ╚═╝  ╚═══╝ ╚═════╝╚═╝  ╚═╝╚══════╝╚═╝  ╚═╝\n```\n\nIt is a pseudo-framework for PHP developers to get a quick start with their projects with the highest control and lowest learning curve!\n\n## Table of Contents\n\n- [PHP Launcher](#php-launcher)\n  - [Table of Contents](#table-of-contents)\n  - [Getting started](#getting-started)\n    - [Step 1: Installation](#step-1-installation)\n  - [Declare custom routes:](#declare-custom-routes)\n    - [Step 1: Enable custom router](#step-1-enable-custom-router)\n    - [Step 2: Create routes](#step-2-create-routes)\n  - [Move to raw routes:](#move-to-raw-routes)\n    - [step 1: Enable raw router](#step-1-enable-raw-router)\n  - [Debugging](#debugging)\n    - [Dump](#dump)\n    - [Die Dump](#die-dump)\n  - [Including static files](#including-static-files)\n    - [1.Images](#1images)\n    - [2. CSS](#2-css)\n    - [3. JS](#3-js)\n    - [4. \\[node\\_module\\] CSS](#4-node_module-css)\n    - [5. \\[node\\_module\\] JS](#5-node_module-js)\n  - [CSRF Protection](#csrf-protection)\n  - [!! Enable Csrf](#-enable-csrf)\n  - [Include CSRF token to Forms](#include-csrf-token-to-forms)\n\n___\n\n## Getting started\n\n### Step 1: Installation\n\nWe have our own installer software which eases the installation process via which you can get started with your projects with a few clicks. The installer is called [PL Installer](https://github.com/hind-sagar-biswas/pl_installer). Go to the repo, then go to [Releases](https://github.com/hind-sagar-biswas/pl_installer/releases) and download binary/exe from the latest release. After downloading, just run it and follow the instructions and you are done!\n\n## Declare custom routes:\n\n### Step 1: Enable custom router\n\nTo enable controlled/custom routes insted of filesystem,go to `/shell/.ev` and change the value of `APP_ROUTE_SYSTEM` to the follwing\n\n```env\nAPP_ROUTE_SYSTEM=controlled\n```\n\n### Step 2: Create routes\n\nTo declare routes go to `/shell/routes/`.In there, there are 2 files i.e `web.php` [that controlls norma routes where response is html] and `api.php` [which controlls api routes for urls starting with `/api/` and response type is JSON].The files content looks like this:\n \n```php\n\u003c?php\n\nuse Core/Router/Router;\n\n$Router-\u003eadd_routes(\n    Router::get('/')-\u003ename('home')-\u003ecall('index'),\n);\n\n```\n\nThere, use `Router::get('/route/path/')-name('route.name')-\u003ecall('file.name')` format to declare new routes \n\n## Move to raw routes:\n\n### step 1: Enable raw router\n\nTo enable raw/filesystem based routes insted of declarative and controlled ones, go to `/shell/.env` and change the value of  `APP_ROUTE_SYSTEM` to the following\n\n```env\nAPP_ROUTE_SYSTEM=raw\n```\n\nNow the routes will follow the name of the file, `url/path/to/filename/` will output the contents of  `./facade/path/to/filename.php`\n\n## Debugging\n\n### Dump\n\nTo dump variables, use `d()` function\n\n### Die Dump\n\nTo dump variables and stop execution, use `dd()` function\n\n## Including static files\n\nStatic files are kept in either `./assets/` or `./node_modules/` directory. CSS, JS and Images are in respectively `/css/`, `/js/` and `/images/ ` directory inside `./assets/`\n\n### 1.Images\n\nUse `_image()` function to get the path\n\n```blade\n\u003cimg src=\"\u003c?= _image('filename.extension') ?\u003e\" alt=\"\"\u003e\n\u003c!-- output --\u003e\n\u003c!-- \u003cimg src=\"href=\"http://url/assets/images/filename.extension\" alt=\"\"\u003e --\u003e\n```\n\n### 2. CSS\n\nUse `_css()` function to get the css inclusion code\n\n```php\n\u003c?php _css('filename');\n// output:\n//\u003clink rel=\"stylesheet\" href=\"http://url/assets/css/filename.css\"\u003e\n\n\n```\n\n### 3. JS\n\nUse `_js()` function to get the js inclusion code\n\n```php\n\u003c?php _js('filename');\n// output:\n//\u003cscript defer src=\"http://url/assets/js/filename.js\"\u003e\u003c/script\u003e\n\n```\n\n### 4. [node_module] CSS\n\nUse `_node_css()` function to get the css inclusion code\n\n```php\n\u003c?php _node_css('path/to/filename.extension');\n// output:\n//\u003clink rel=\"stylesheet\" href=\"http://url/node_modules/path/to/filename.extension\"\u003e\n\n```\n\n### 5. [node_module] JS\n\nUse `_node_js()` function to get the js inclusion code\n\n```php\n\u003c?php _node_js('path/to/filename.extension'); ?\u003e\n// output:\n//\u003cscript defer src=\"http://url/node_modules/path/to/filename.extension\"\u003e\u003c/script\u003e\n\n```\n\n## CSRF Protection\n\n## !! Enable Csrf\n\nFirst enable csrf from `.env` file and to do that, go to ` /shell/.env` and change the value of  `CSRF_ENABLED` to the following\n\n```env\nCSRF_ENABLED=true\n```\n\n## Include CSRF token to Forms\n\nCSRF protection is only needed in `post ` requests. So, you need to include the CSRF token as a hidden input element in every `form:post` forms. To do that just call `_csrf()` function.\n\n```blade\n\u003cform action=\"\u003c?= ROUTER-\u003epostRoute('route.name') ?\u003e\" method=\"Post\"\u003e\n\u003c?php _csrf() ?\u003e\n\u003c!-- other input fields and submit button here --\u003e\n\u003c/form\u003e\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhind-sagar-biswas%2Fphp_launcher","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhind-sagar-biswas%2Fphp_launcher","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhind-sagar-biswas%2Fphp_launcher/lists"}