{"id":21557037,"url":"https://github.com/ingeniasoftware/luthier-framework","last_synced_at":"2025-04-10T10:23:30.181Z","repository":{"id":62520546,"uuid":"96002807","full_name":"ingeniasoftware/luthier-framework","owner":"ingeniasoftware","description":"Versatile PHP micro-framework for build APIs and websites quickly                                               ","archived":false,"fork":false,"pushed_at":"2019-02-14T17:35:33.000Z","size":209,"stargazers_count":15,"open_issues_count":0,"forks_count":3,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-24T09:11:33.402Z","etag":null,"topics":["framework","micro-framework","middleware","php","php-framework","php7","psr7","router"],"latest_commit_sha":null,"homepage":"https://luthier.ingenia.me/framework/en/","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/ingeniasoftware.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}},"created_at":"2017-07-02T04:44:51.000Z","updated_at":"2024-03-11T10:20:22.000Z","dependencies_parsed_at":"2022-11-02T13:32:06.763Z","dependency_job_id":null,"html_url":"https://github.com/ingeniasoftware/luthier-framework","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ingeniasoftware%2Fluthier-framework","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ingeniasoftware%2Fluthier-framework/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ingeniasoftware%2Fluthier-framework/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ingeniasoftware%2Fluthier-framework/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ingeniasoftware","download_url":"https://codeload.github.com/ingeniasoftware/luthier-framework/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248199086,"owners_count":21063641,"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":["framework","micro-framework","middleware","php","php-framework","php7","psr7","router"],"created_at":"2024-11-24T08:10:44.088Z","updated_at":"2025-04-10T10:23:30.158Z","avatar_url":"https://github.com/ingeniasoftware.png","language":"PHP","funding_links":["https://patreon.com/ingenia"],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e \n    \u003cimg src=\"https://ingenia.me/images/luthier-framework/logo.png\" width=\"100\" /\u003e \n\u003c/p\u003e \n \n\u003cp align=\"center\"\u003e\u003cstrong\u003eWARNING: Under development!\u003c/strong\u003e\u003c/p\u003e \n \n**Luthier Framework** is a versatile PHP micro-framework for build APIs and small websites quickly. When we say \"micro\" we mean REALLY micro: in fact, only Composer and a single .php file is required to start. \n \n### Features \n \n* Based on the Symfony components \n* Easy to learn and extend \n* Powerful and flexible router with middleware support \n* CSRF protection \n* JSON and XML response helpers \n* Validator with translated error messages \n* Dependency Injection container \n* Command Line Interface command creation \n* Built-in plain PHP template engine with Twig and Blade integration \n \n### Requirements \n \n* PHP \u003e= 7.1.8 \n* Composer \n \n### Installation \n \nGet Luthier Framework with composer: \n \n``` \ncomposer require luthier/framework \n``` \n \n### Usage \n \nBasic example: \n \n```php \n\u003c?php \n# your_app/index.php \n \nrequire 'vendor/autoload.php'; \n \n$app = new Luthier\\Framework(); \n \n$app-\u003eget('/', function(){ \n    $this-\u003eresponse-\u003ewrite(\"Hello world!\"); \n}); \n \n$app-\u003egroup('api', function(){ \n \n    $this-\u003eget('/', function(){ \n        json_response(['message' =\u003e 'Welcome to Luthier Framework!']); \n    }); \n    $this-\u003eget('about', function(){ \n        json_response(['version' =\u003e Luthier\\Framework::VERSION]); \n    }); \n \n}); \n \n$app-\u003erun(); \n``` \n \nDefining routes: \n \n```php \n$app-\u003eget('foo/', function(){ \n    // Default template engine (will search for /foo.php file) \n    view('foo'); \n}); \n \n$app-\u003epost('bar/', function(){ \n    view('bar'); \n}); \n \n$app-\u003ematch(['get','post'], 'baz/', function(){ \n    view('baz'); \n}); \n``` \n \nRouter parameters: \n \n```php \n$app-\u003eget('hello/{name}', function($name){ \n    $this-\u003eresponse-\u003ewrite(\"Hello $name!\"); \n}); \n \n// Optional parameters \n \n$app-\u003eget('about/{category?}', function($category = 'animals'){ \n    $this-\u003eresponse-\u003ewrite(\"Category: category\"); \n}); \n \n// Regex parameters \n \n$app-\u003eget('website/{((en|es|fr)):lang}', function($lang){ \n    $this-\u003eresponse-\u003ewrite($lang); \n}); \n``` \n \nRoute middleware: \n \n```php \n// Global middleware: \n \n$app-\u003emiddleware(function($request, $response, $next){ \n    $response-\u003ewrite('Global \u003cbr\u003e'); \n    $next($request, $response); \n}); \n \n// Global middleware (but not assigned to any route yet) \n \n$app-\u003emiddleware('test', function($request, $response, $next){ \n    $response-\u003ewrite('Before route\u003cbr\u003e'); \n    $next($request, $response); \n    $response-\u003ewrite('After route \u003cbr\u003e'); \n}); \n \n$this-\u003eget('/', function(){ \n    $this-\u003eresponse-\u003ewrite('Route \u003cbr\u003e') \n})-\u003emiddleware('test'); // \u003c- assign the 'test' middleware to this route \n \n``` \n \n### Documentation \n \nComing soon! \n \n### Related projects \n \n* [Luthier CI](https://github.com/ingeniasoftware/luthier-ci): Improved routing, middleware support, authentication tools and more for CodeIgniter 3 framework \n* [SimpleDocs](https://github.com/ingeniasoftware/simpledocs): Dynamic documentation library for PHP which uses Markdown files \n \n### Donate \n \nIf you love our work,  consider support us on [Patreon](https://patreon.com/ingenia) \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fingeniasoftware%2Fluthier-framework","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fingeniasoftware%2Fluthier-framework","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fingeniasoftware%2Fluthier-framework/lists"}