{"id":42131063,"url":"https://github.com/oriondevelops/larashared","last_synced_at":"2026-01-26T15:34:26.455Z","repository":{"id":61551532,"uuid":"552401651","full_name":"oriondevelops/larashared","owner":"oriondevelops","description":"Larashared is a deployment guide and a helper api in shared hosting environments where ssh access is not available.","archived":false,"fork":false,"pushed_at":"2023-02-05T22:02:27.000Z","size":142,"stargazers_count":10,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-09-13T23:24:42.153Z","etag":null,"topics":["api","laravel","laravel-package","php"],"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/oriondevelops.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-10-16T14:10:37.000Z","updated_at":"2023-02-05T22:21:53.000Z","dependencies_parsed_at":"2023-02-19T02:15:58.218Z","dependency_job_id":null,"html_url":"https://github.com/oriondevelops/larashared","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/oriondevelops/larashared","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oriondevelops%2Flarashared","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oriondevelops%2Flarashared/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oriondevelops%2Flarashared/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oriondevelops%2Flarashared/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oriondevelops","download_url":"https://codeload.github.com/oriondevelops/larashared/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oriondevelops%2Flarashared/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28781511,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-26T13:55:28.044Z","status":"ssl_error","status_checked_at":"2026-01-26T13:55:26.068Z","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":["api","laravel","laravel-package","php"],"created_at":"2026-01-26T15:34:25.731Z","updated_at":"2026-01-26T15:34:26.448Z","avatar_url":"https://github.com/oriondevelops.png","language":"PHP","funding_links":["https://www.buymeacoffee.com/oriondevelops"],"categories":[],"sub_categories":[],"readme":"![Larashared](larashared.png)\n\n---\n# Larashared\n\n[![Latest Version on Packagist](https://img.shields.io/packagist/v/oriondevelops/larashared.svg?style=flat-square)](https://packagist.org/packages/oriondevelops/larashared)\n[![Total Downloads](https://img.shields.io/packagist/dt/oriondevelops/larashared.svg?style=flat-square)](https://packagist.org/packages/oriondevelops/larashared)\n\n#### Shared Hosting Deployment Management for Laravel\n\nLarashared is a deployment guide and a helper api in shared hosting environments where ssh access is not available.\n\nIt allows using basic Artisan commands through an API by sending post requests with a bearer token for authorization. The package can be installed via composer and the configuration file can be published to modify the API path and the token. The package has several endpoints for different Artisan commands like optimizing, enabling/disabling maintenance mode, cache operations, etc.\n\n## Disclaimer\n\nDeploying Laravel on shared hosting is not recommended. Check out this article by Pardeep Kumar:\n\n[Here’s Why You Should Stay Away From Laravel Shared Hosting](https://www.cloudways.com/blog/stay-away-from-laravel-shared-hosting/)\n\n## Support me\n\n[![\"Buy Me A Coffee\"](https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png)](https://www.buymeacoffee.com/oriondevelops)  \nor send your love \u0026 energy \u003c3\n\n## Installation\n\nYou can install the package via composer:\n\n```bash\ncomposer require oriondevelops/larashared\n```\n\nYou can publish the config file with:\n\n```bash\nphp artisan vendor:publish --tag=\"larashared-config\"\n```\n\nThis is the contents of the published config file:\n\n```php\nreturn [\n    /*\n    |--------------------------------------------------------------------------\n    | API Path\n    |--------------------------------------------------------------------------\n    |\n    | This is the URI path where API will be accessible from. Feel free to\n    | change this path to anything you like.\n    |\n    */\n    'path' =\u003e env('LARASHARED_PATH', 'larashared'),\n\n    /*\n    |--------------------------------------------------------------------------\n    | Token\n    |--------------------------------------------------------------------------\n    |\n    | This value is the token the API will be accessible with.\n    |\n    */\n    'token' =\u003e env('LARASHARED_TOKEN', '1|gnmyXCnxxN23MAMxx2dCv5BgT4cUOo6ZWSdUPqWT'),\n];\n```\n\n## Deployment\n\n* Make a fresh copy of your application 🎁\n\n\n* Build your production assets 🔧  \n\n  ```bash\n  # For example\n  npm install\n  \n  npm run build\n  ```\n  \n* Install dependencies excluding dev packages ↙️\n\n    ```bash\n    composer install --optimize-autoloader --no-dev\n    ```\n\n   ```bash\n    npm install --omit=dev\n    ```\n  \n* Create the .env and fill it according to your shared hosting settings and add `LARASHARED_TOKEN` to your .env file 🔁\n\n\n* You can now copy the default htaccess file and set a random token by\n  the `larashared:install` Artisan command ⚙️\n\n  ```bash\n  php artisan larashared:install\n  ```\n  \n* Move your application with all files and folders to your root folder by FTP 🚀\n\n\n* (Optional) Run your migrations using [migration endpoint](#migrate) ↗️\n\n## Usage\n\n### Authorization\n\n```\nAuthorization: Bearer \u003c\u003cYour Token\u003e\u003e\n```\n\nYou can now send post requests to the endpoints using your token.\n\n`POST /larashared/optimize`\n\n```php\n\u003c?php\n$client = new Client();\n$request = new Request('POST', 'https://example.com/larashared/optimize');\n$res = $client-\u003esendAsync($request)-\u003ewait();\necho $res-\u003egetBody();\n```\n\n### Response\n\n```json\n{\n  \"success\": true,\n  \"data\": \"Success\",\n  \"message\": \"Command successful.\"\n}\n```\n\n### API Endpoints\n| HTTP Verbs | Endpoints                    | Action                                | Parameters                     |\n|------------|------------------------------|---------------------------------------|--------------------------------|\n| POST       | /larashared/optimize         | Run artisan optimize command          |                                |\n| POST       | /larashared/optimize/clear   | Run artisan optimize:clear command    |                                |\n| POST       | /larashared/maintenance      | Enable or disable maintenance mode    | status, secret, refresh, retry |\n| POST       | /larashared/config/cache     | Run artisan config:cache command      |                                |\n| POST       | /larashared/config/clear     | Run artisan config:clear command      |                                |\n| POST       | /larashared/route/cache      | Run artisan route:cache command       |                                |\n| POST       | /larashared/route/clear      | Run artisan route:clear command       |                                |\n| POST       | /larashared/view/cache       | Run artisan view:cache command        |                                |\n| POST       | /larashared/view/clear       | Run artisan view:clear command        |                                |\n| POST       | /larashared/migrate          | Run artisan migrate command           | seed, force, pretend, step     |\n| POST       | /larashared/migrate/fresh    | Run artisan migrate:fresh command     |                                |\n| POST       | /larashared/migrate/refresh  | Run artisan migrate:refresh command   |                                |\n| POST       | /larashared/migrate/rollback | Run artisan migrate:rollback command  |                                |\n| POST       | /larashared/migrate/reset    | Run artisan migrate:reset command     |                                |\n| POST       | /larashared/seed             | Run artisan db:seed command           | class, force                   |\n\n### Maintenance Mode\n\n#### Form Data\n\n`status` `secret` `refresh` `retry`  \n\nStatus should be \"up\" or \"down\", it will be down if not specified.\n\nOthers are the same options of the artisan command. More information can be found at [Laravel Docs.](https://laravel.com/docs/9.x/configuration#maintenance-mode)\n\nTo be able to use the api in maintenance mode, do not forget to update following middleware.\n\n```php\n    // app/http/middleware/PreventRequestsDuringMaintenance.php\n    /**\n     * The URIs that should be reachable while maintenance mode is enabled.\n     *\n     * @var array\u003cint, string\u003e\n     */\n    protected $except = [\n        'larashared/*'\n    ];\n```\n\n### Migrate\n\n`POST /larashared/migrate`  \n`POST /larashared/migrate/fresh`  \n`POST /larashared/migrate/refresh`  \n`POST /larashared/migrate/rollback`  \n`POST /larashared/migrate/reset`\n\n#### Form Data\n\n`seed` `force` `pretend` `step`\n\n### Seed\n\n`POST /larashared/seed`\n\n#### Form Data\n\n`class` `force`\n\nOptionally seeder class can be specified by class parameter.\n\nIf you plan to seed your application, make sure dev dependencies like `fakerphp/faker` are installed.\n\n## Credits\n\n- [Mücahit Uğur](https://mucahitugur.com)\n\n## License\n\nThe MIT License (MIT). Please see [License File](LICENSE.md) for more information.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foriondevelops%2Flarashared","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foriondevelops%2Flarashared","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foriondevelops%2Flarashared/lists"}