{"id":21696682,"url":"https://github.com/patrickcurl/backend-assessment","last_synced_at":"2026-04-19T04:31:31.857Z","repository":{"id":152635473,"uuid":"122686426","full_name":"patrickcurl/backend-assessment","owner":"patrickcurl","description":"This is just an assessment of my skills in php using the Klein router package.","archived":false,"fork":false,"pushed_at":"2018-02-24T08:33:07.000Z","size":1080,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-25T14:12:05.025Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/patrickcurl.png","metadata":{"files":{"readme":"README.md","changelog":null,"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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-02-24T00:18:27.000Z","updated_at":"2018-02-24T08:34:21.000Z","dependencies_parsed_at":"2023-08-07T22:31:41.105Z","dependency_job_id":null,"html_url":"https://github.com/patrickcurl/backend-assessment","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patrickcurl%2Fbackend-assessment","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patrickcurl%2Fbackend-assessment/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patrickcurl%2Fbackend-assessment/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patrickcurl%2Fbackend-assessment/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/patrickcurl","download_url":"https://codeload.github.com/patrickcurl/backend-assessment/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244636533,"owners_count":20485442,"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":[],"created_at":"2024-11-25T19:21:18.012Z","updated_at":"2026-04-19T04:31:26.820Z","avatar_url":"https://github.com/patrickcurl.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Backend Assessment using Klein PHP Router.\n\nThis project uses phpdotenv, eloquent, klein.php, and filip/whoops. \n\nSetup: \n\n1. Setup environment variables: \n```bash \n    $ cp .env.example .env\n``` \n2. Edit .env to match your local mysql settings.\n\n    ```Note the DB_ENGINE must be MyISAM if using mysql version less than 5.6 to support fulltext indexing.``` \n\n3. point your apache/nginx vhost at public folder.  \n\n    Note for NGINX the most important part was having ```try_files $uri $uri/ /index.php?q=$uri\u0026$args;``` inside the ```location/{...}``` block. \n    \n    [See my nginx management tool for help setting up on linux.](https://github.com/patrickcurl/ngTool)\n\n\n4. From commandline run the following commands: \n    ```bash\n       $ php composer install \u0026\u0026 php vendor/bin/phinx migrate\n    ```\n\nUsage: \n\nRoutes are in app/routes.php \n\nThe following routes are setup: \n\n```\n    /**\n     * Index of all addresses.\n     * (GET) http://back.test/addresses \n     * --\u003e returns json of all addresses from db.\n     */\n    $route-\u003erespond('GET', '/addresses', [$addressController, 'index']);\n\n    /**\n     * Search addresses by field and query. I.E. \n     * (GET) http://back.test/addresses/search/field/query\n     * $field can be: zipcode or name, \n     * $query is what to match against, examples: \n     * http://back.test/addresses/search/zipcode/84 =\u003e 84604, 84601, etc would match.\n     * http://back.test/addresses/search/name/ho =\u003e house, home, etc would match.\n     */\n    $route-\u003erespond('GET', '/addresses/search/[:field]/[:query]', [$addressController, 'search']);\n\n    /**\n     * Create address.\n     * (POST) http://back.test/addresses \n     * all fields except address_2 are required and must meet validations. \n     * Zipcode is numeric 5-10 chars, all others are alphanumeric, spaces, hyphens, and underscores. \n     * address_2 has no validations as it's not required. \n     */\n    $route-\u003erespond('POST', '/addresses', [$addressController, 'store']);\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpatrickcurl%2Fbackend-assessment","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpatrickcurl%2Fbackend-assessment","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpatrickcurl%2Fbackend-assessment/lists"}