{"id":15937188,"url":"https://github.com/rawilk/laravel-stubs","last_synced_at":"2025-07-10T13:33:54.579Z","repository":{"id":60524202,"uuid":"543633643","full_name":"rawilk/laravel-stubs","owner":"rawilk","description":"Opinionated modifications to the default Laravel stubs.","archived":false,"fork":false,"pushed_at":"2025-05-12T02:40:12.000Z","size":117,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-10T21:58:49.859Z","etag":null,"topics":["laravel","laravel-stubs"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":false,"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/rawilk.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":".github/CONTRIBUTING.md","funding":".github/FUNDING.yml","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},"funding":{"github":"rawilk"}},"created_at":"2022-09-30T14:12:50.000Z","updated_at":"2025-05-12T02:40:09.000Z","dependencies_parsed_at":"2025-03-18T19:41:35.395Z","dependency_job_id":"41397d7e-4018-469a-8e13-256c72a02830","html_url":"https://github.com/rawilk/laravel-stubs","commit_stats":{"total_commits":51,"total_committers":4,"mean_commits":12.75,"dds":0.3529411764705882,"last_synced_commit":"6f232845d1b8ebaf522e1cd85c91ebb0eb765d01"},"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/rawilk/laravel-stubs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rawilk%2Flaravel-stubs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rawilk%2Flaravel-stubs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rawilk%2Flaravel-stubs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rawilk%2Flaravel-stubs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rawilk","download_url":"https://codeload.github.com/rawilk/laravel-stubs/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rawilk%2Flaravel-stubs/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264585372,"owners_count":23632647,"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":["laravel","laravel-stubs"],"created_at":"2024-10-07T05:00:54.356Z","updated_at":"2025-07-10T13:33:54.221Z","avatar_url":"https://github.com/rawilk.png","language":"PHP","funding_links":["https://github.com/sponsors/rawilk"],"categories":[],"sub_categories":[],"readme":"# laravel-stubs\n\n[![Latest Version on Packagist](https://img.shields.io/packagist/v/rawilk/laravel-stubs.svg?style=flat-square)](https://packagist.org/packages/rawilk/laravel-stubs)\n![Tests](https://github.com/rawilk/laravel-stubs/workflows/Tests/badge.svg?style=flat-square)\n[![Total Downloads](https://img.shields.io/packagist/dt/rawilk/laravel-stubs.svg?style=flat-square)](https://packagist.org/packages/rawilk/laravel-stubs)\n[![PHP from Packagist](https://img.shields.io/packagist/php-v/rawilk/laravel-stubs?style=flat-square)](https://packagist.org/packages/rawilk/laravel-stubs)\n[![License](https://img.shields.io/github/license/rawilk/laravel-stubs?style=flat-square)](https://github.com/rawilk/laravel-stubs/blob/main/LICENSE.md)\n\n![Social image](https://banners.beyondco.de/laravel-stubs.png?theme=light\u0026packageManager=composer+require\u0026packageName=rawilk%2Flaravel-stubs+--dev\u0026pattern=endlessClouds\u0026style=style_1\u0026description=Opinionated+modifications+to+the+default+Laravel+stubs.\u0026md=1\u0026showWatermark=0\u0026fontSize=100px\u0026images=collection)\n\nThis repo contains opinionated versions of the Laravel stubs. The most notable changes are:\n\n- migrations don't have a `down` function\n- controllers don't extend a base controller\n- none of the model attributes are guarded\n- use return type hints where possible\n- most docblocks have been removed\n- `declare(strict_types=1);` added to most files\n\n## Installation\n\nYou can install the package via composer:\n\n```bash\ncomposer require rawilk/laravel-stubs --dev\n```\n\nIf you want to keep your stubs up-to-date with every update, add this composer hook to your composer.json file:\n\n```json\n\"scripts\": {\n    \"post-update-cmd\": [\n        \"@php artisan custom-stub:publish --force\"\n    ]\n}\n```\n\n## Usage\n\nYou can publish the stubs using this command:\n\n```bash\nphp artisan custom-stub:publish\n```\n\n## Usage in Packages\n\nIf you're developing a package, you may pull these stubs in to your package and generate them just like you would with a normal Laravel project. This is possible when used with [Orchestral Canvas](https://github.com/orchestral/canvas). On your package project, run the following command:\n\n```bash\ncomposer require --dev rawilk/laravel-stubs orchestra/canvas\n```\n\nNext you need to run:\n\n```bash\ncomposer exec canvas preset package\n```\n\nFinally, modify the generated `canvas.yaml` file:\n\n```yaml\npreset: Rawilk\\Stubs\\Canvas\\Package\nnamespace: YourPackageNamespace\n```\n\nTo generate a file, you can run the following command:\n\n```bash\ncomposer exec canvas make:migration CreatePostsTable --create\n```\n\nRunning this would generate a migration normally, just like the `php artisan make:migration` command would. For more information on canvas, please refer to their documentation.\n\n**Tip:** Create an alias for `composer exec canvas` in your profile to allow easier entering of your generator commands. I personally added the following alias to my bash profile:\n\n```bash\nalias canvas=\"composer exec canvas\"\n```\n\n## Testing\n\n```bash\ncomposer test\n```\n\n## Changelog\n\nPlease see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.\n\n## Contributing\n\nPlease see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.\n\n## Credits\n\n- [Randall Wilk](https://github.com/rawilk)\n- [All Contributors](../../contributors)\n\n## License\n\nThe MIT License (MIT). Please see [License File](LICENSE.md) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frawilk%2Flaravel-stubs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frawilk%2Flaravel-stubs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frawilk%2Flaravel-stubs/lists"}