{"id":38587253,"url":"https://github.com/yourjhay/simple-php","last_synced_at":"2026-01-17T08:21:13.443Z","repository":{"id":62535230,"uuid":"191104894","full_name":"yourjhay/simple-php","owner":"yourjhay","description":"Lightweight PHP Framework","archived":false,"fork":false,"pushed_at":"2023-11-20T23:53:30.000Z","size":550,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-07-27T18:19:15.720Z","etag":null,"topics":["framework","micro-framework","php","php-frameworks"],"latest_commit_sha":null,"homepage":"https://simply-docs.herokuapp.com","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yourjhay.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2019-06-10T05:49:43.000Z","updated_at":"2023-06-24T18:08:50.000Z","dependencies_parsed_at":"2023-11-21T00:42:19.501Z","dependency_job_id":null,"html_url":"https://github.com/yourjhay/simple-php","commit_stats":null,"previous_names":[],"tags_count":47,"template":false,"template_full_name":null,"purl":"pkg:github/yourjhay/simple-php","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yourjhay%2Fsimple-php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yourjhay%2Fsimple-php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yourjhay%2Fsimple-php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yourjhay%2Fsimple-php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yourjhay","download_url":"https://codeload.github.com/yourjhay/simple-php/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yourjhay%2Fsimple-php/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28504363,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T06:57:29.758Z","status":"ssl_error","status_checked_at":"2026-01-17T06:56:03.931Z","response_time":85,"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":["framework","micro-framework","php","php-frameworks"],"created_at":"2026-01-17T08:21:13.359Z","updated_at":"2026-01-17T08:21:13.435Z","avatar_url":"https://github.com/yourjhay.png","language":"PHP","readme":"# The Simply PHP Framework\n[![Latest Stable Version](https://poser.pugx.org/simplyphp/framework/v/stable)](https://packagist.org/packages/simplyphp/framework)\n[![Total Downloads](https://poser.pugx.org/simplyphp/framework/downloads)](https://packagist.org/packages/simplyphp/framework)\n[![License](https://poser.pugx.org/simplyphp/framework/license)](https://packagist.org/packages/simplyphp/framework)\n[![Monthly Downloads](https://poser.pugx.org/simplyphp/framework/d/monthly)](https://packagist.org/packages/simplyphp/framework)\n\n## About Simple\nThe Simple PHP is lightweight web application micro framework.\n- Uses Model, View, Controller Pattern\n- Simple Routing engine\n- Using namespace in classes with autoloading\n- Controllers with method filters\n- Applying PSR-12 Extended Coding Standard\n- Uses Twig Template Engine (optional)\n- Models with resource-friendly connectivity\n- Evironment Configuration\n- Error Handling and Reporting\n- Easily manage dependency using composer\n\n## FULL DOCUMENTATION\nhttps://simply-docs.herokuapp.com\n\n\n# Simple PHP dependencies\n- [Twig Template Engine](https://twig.symfony.com)\n\n# Coding Style Guide\nYou must follow this standard: https://www.php-fig.org/psr/psr-2/ HAPPY CODING :)\n\n# Installation\nVia Composer: (recommended) \n```\ncomposer create-project reyjhon/simple-php\ncd simple-php\n```\n\n# VIEWS\nThis micro framework uses twig for the template engine. But it is *OPTIONAL*. Yes, you can use the plain html only without using twig.\n\n- views must be located at *app/Views* directory.\n- all views must be name with suffix *view* before the file extension.\n   eg: *welcome.**view**.html*, *product.**view**.html*\n- view cache can be enable or disable in the application config\n\n## When rendering a view: (uses twig)\n```php\nreturn view('welcome');\n```\nwhen a view is inside a folder, include the *folder* then *view name* separated by *period*\n```php\nreturn view('your_folder.welcome');\n```\nPlease read the twig documentation for more information:\nhttps://twig.symfony.com/doc/2.x/\n\n**NOTE:** \n- You views must be a valid html file. eg: *welcome.view.html*\n- layout files can be be a twig file. eg: *layout.twig*, *master.twig*\n\n## When rendering normal view: (plain html)\n\nPass a third parameter *normal* to recognize it that you want to render without template engine.\n```php\nreturn view('welcome', [], 'normal');\n```\n**NOTE:** \n- You views must be a valid php file. eg: *welcome.view.php*\n- normal rendering doesn't support inheretance\n- Second parameter is the variables you want to passed. If empty, it must be initialize when rendering normal view.\n\n### restrict controller to authenticated users only\nadd the _Action_ suffix into your method name.  \n\nexample: if you have a method index in your controller:\n```php\n   public function index()\n```\nMake it:\n```php\npublic function indexAction()\n```\nThen add this to 'App/Controllers/Controller.php':\n```php\nuse App\\Helper\\Auth\\AuthHelper as auth;\nuse Simple\\Request;\n```\nAnd create a new method _before_ in *Controller.php* like this:\n```php\n    public function before()\n    {\n        if(!auth::user()) {\n           Request::redirect('/auth/index');\n        }\n    }\n```\nThe un-authenticated user tries to access your restricted controller will be redirected to login page.\n\n## Using auth in views\nIf the user is authenticated the user variable is not null.:\n```html\n  {% if user is null %}\n      \u003cp\u003e Please login \u003c/p\u003e\n  {% else %}\n      \u003cp\u003e Hello {{ user.name }} \u003c/p\u003e  \n  {% endif %}\n```\n- {{ user.name }} display name of current logged in user.\n- {{ user.email }} display email of current logged in user.\n- {{ user.id }} display ID of current logged in user.\n\n# Validation\nRead documentation at https://simply-docs.herokuapp.com/documentation/v1/lib/validation\n\n\n# File Upload (on development)\nUsing the file upload object in controller\n\nExample in your store action:\n```php\npublic function store(Request $request)\n{\n   $file = $request-\u003efile('profile_photo'); // profile_photo is the field name of the input type=\"file\" element\n   $file-\u003eupload('folder_name'); // specify the folder where the file is going to store, if upload success it wil return true otherwise false.\n}\n```\n**Available Methods:**\n- *getFileName()* returns the original filename of the uploaded file\n- *getUploadedFileName()* returns the filename of the file when uploaded.\n- *getFileSize()* returns the size of the uploaded file\n- *getFileExtension()* returns the extension of the uploaded file\n- *getFileType()* returns the file type of the uploaded file\n- *upload($path)* upload to specified path\n\n# Simply Cryptography \nSimply Framework offers encryption library using a KEY. This uses defuse/php-encryption you can read more at https://github.com/defuse/php-encryption\n\nBefore using encryption please run this command **ONCE**:\n```\nphp cli key:generate\n```\n## Encryption\nTo encryp a text or string:\n```php\nuse Simple\\Security\\SimplyEncrypt;\n```\nThen you can use is as:\n```php\n$encrypted = SimplyEncrypt::encrypt('secret text');\n```\n## Decryption\nTo decrypt a text or string:\n```php\nuse Simple\\Security\\SimplyDecrypt;\n```\nThen you can use is as:\n```php\n$decrypted = SimplyDecrypt::decrypt($ciphertext);\n```\n\n## DUMPING VARIABLES\nin replace of var_dump, use *dump* instead.\n```php\ndd($var)\n```\n## Documentation will be updated soon... \n\n\n\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyourjhay%2Fsimple-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyourjhay%2Fsimple-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyourjhay%2Fsimple-php/lists"}