{"id":13404973,"url":"https://github.com/guillaumebriday/laravel-blog","last_synced_at":"2025-04-11T00:50:28.834Z","repository":{"id":36960462,"uuid":"81362469","full_name":"guillaumebriday/laravel-blog","owner":"guillaumebriday","description":"Laravel 11.0 blog application with Hotwire, Horizon, Telescope, Sanctum, Breeze and Pusher","archived":false,"fork":false,"pushed_at":"2024-10-20T10:51:08.000Z","size":3686,"stargazers_count":1785,"open_issues_count":6,"forks_count":595,"subscribers_count":90,"default_branch":"master","last_synced_at":"2025-04-03T21:31:41.510Z","etag":null,"topics":["api","best-practices","blog","hotwire","hotwire-turbo","laravel","laravel-11","laravel-breeze","laravel-horizon","laravel-sanctum","laravel-telescope","php"],"latest_commit_sha":null,"homepage":"https://laravel-blog.guillaumebriday.fr","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/guillaumebriday.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"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":"guillaumebriday"}},"created_at":"2017-02-08T18:34:24.000Z","updated_at":"2025-04-01T07:51:49.000Z","dependencies_parsed_at":"2023-12-25T00:20:41.654Z","dependency_job_id":"23df6228-9743-48f5-9925-e2e88ca7c8ba","html_url":"https://github.com/guillaumebriday/laravel-blog","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guillaumebriday%2Flaravel-blog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guillaumebriday%2Flaravel-blog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guillaumebriday%2Flaravel-blog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guillaumebriday%2Flaravel-blog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/guillaumebriday","download_url":"https://codeload.github.com/guillaumebriday/laravel-blog/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248322609,"owners_count":21084336,"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":["api","best-practices","blog","hotwire","hotwire-turbo","laravel","laravel-11","laravel-breeze","laravel-horizon","laravel-sanctum","laravel-telescope","php"],"created_at":"2024-07-30T19:01:53.968Z","updated_at":"2025-04-11T00:50:28.815Z","avatar_url":"https://github.com/guillaumebriday.png","language":"PHP","funding_links":["https://github.com/sponsors/guillaumebriday"],"categories":["PHP","Uncategorized"],"sub_categories":["Uncategorized"],"readme":"# Laravel 11.x blog\n\nThe purpose of this repository is to show good development practices on [Laravel](http://laravel.com/) as well as to present cases of use of the framework's features like:\n\n- [Authentication](https://laravel.com/docs/11.x/authentication)\n- API\n  - [Sanctum](https://laravel.com/docs/11.x/sanctum)\n  - [API Resources](https://laravel.com/docs/11.x/eloquent-resources)\n  - Versioning\n- [Blade](https://laravel.com/docs/11.x/blade)\n- [Broadcasting](https://laravel.com/docs/11.x/broadcasting)\n- [Cache](https://laravel.com/docs/11.x/cache)\n- [Email Verification](https://laravel.com/docs/11.x/verification)\n- [Filesystem](https://laravel.com/docs/11.x/filesystem)\n- [Helpers](https://laravel.com/docs/11.x/helpers)\n- [Horizon](https://laravel.com/docs/11.x/horizon)\n- [Localization](https://laravel.com/docs/11.x/localization)\n- [Mail](https://laravel.com/docs/11.x/mail)\n- [Migrations](https://laravel.com/docs/11.x/migrations)\n- [Policies](https://laravel.com/docs/11.x/authorization)\n- [Providers](https://laravel.com/docs/11.x/providers)\n- [Requests](https://laravel.com/docs/11.x/validation#form-request-validation)\n- [Seeding \u0026 Factories](https://laravel.com/docs/11.x/seeding)\n- [Testing](https://laravel.com/docs/11.x/testing)\n- [Homestead](https://laravel.com/docs/11.x/homestead)\n\nBeside Laravel, this project uses other tools like:\n\n- [Bootstrap 5.x](https://getbootstrap.com/)\n- [Pint](https://github.com/laravel/pint)\n- [Font Awesome](https://fontawesome.com/)\n- [Hotwired](https://hotwired.dev/)\n- [Redis](https://redis.io/)\n- [spatie/laravel-medialibrary](https://github.com/spatie/laravel-medialibrary)\n- [hotwired-laravel/turbo-laravel](https://github.com/hotwired-laravel/turbo-laravel)\n- Many more to discover.\n\n## Some screenshots\n\nYou can find some screenshots of the application on : [https://imgur.com/a/Jbnwj](https://imgur.com/a/Jbnwj)\n\n## Installation\n\nTo create your development environment [follow these instructions](https://laravel.com/docs/11.x/installation#local-installation-using-herd).\n\nSetting up your development environment on your local machine:\n```bash\n$ git clone https://github.com/guillaumebriday/laravel-blog.git\n$ cd laravel-blog\n$ cp .env.example .env\n$ php artisan key:generate\n$ php artisan horizon:install\n$ php artisan telescope:install\n$ php artisan storage:link\n```\n\nNow open [http://laravel-blog.test](http://laravel-blog.test).\n\n### Mailer\n\nYou can use [Mailpit](https://github.com/axllent/mailpit) to test your emails in development.\n\nOnce installed, open [http://localhost:8025](http://localhost:8025).\n\n## Before starting\nYou need to run the migrations with the seeds :\n```bash\n$ php artisan migrate:fresh --seed\n```\n\nThis will create a new user that you can use to sign in :\n```yml\nemail: demo@demo.com\npassword: demodemo\n```\n\nAnd then, compile the assets :\n```bash\n$ yarn dev\n```\n\nStarting job for newsletter :\n```bash\n$ php artisan tinker\n\u003e PrepareNewsletterSubscriptionEmail::dispatch();\n```\n\n## Useful commands\n\nStart Laravel Horizon:\n```bash\n$ php artisan horizon\n```\n\nSeeding the database :\n```bash\n$ php artisan db:seed\n```\n\nRunning tests :\n```bash\n$ php artisan test\n```\n\nRunning Laravel Pint :\n```bash\n$ ./vendor/bin/pint --verbose --test\n```\n\nGenerating backup :\n```bash\n$ php artisan vendor:publish --provider=\"Spatie\\Backup\\BackupServiceProvider\"\n$ php artisan backup:run\n```\n\nGenerating fake data :\n```bash\n$ php artisan db:seed --class=DevDatabaseSeeder\n```\n\nDiscover package\n```bash\n$ php artisan package:discover\n```\n\nIn development environment, rebuild the database :\n```bash\n$ php artisan migrate:fresh --seed\n```\n\n## Accessing the API\n\nClients can access to the REST API. API requests require authentication via Bearer token.\n\nGenerate a new token:\n\n```bash\ncurl --location --request POST 'laravel-blog.test/api/v1/authenticate?email=your_email\u0026password=your_password' \\\n     --header 'X-Requested-With: XMLHttpRequest'\n```\n\nAnd now you can use the `meta.access_token` key as your `Bearer` token:\n\n```bash\ncurl --location 'laravel-blog.test/api/v1/posts' \\\n      --header 'X-Requested-With: XMLHttpRequest' \\\n      --header 'Authorization: Bearer access_token'\n```\n\nAPI are prefixed by `api` and the API version number like so `v1`.\n\nDo not forget to set the `X-Requested-With` header to `XMLHttpRequest`. Otherwise, Laravel won't recognize the call as an AJAX request.\n\nTo list all the available routes for API :\n\n```bash\n$ php artisan route:list --path=api\n```\n\n## Contributing\n\nDo not hesitate to contribute to the project by adapting or adding features ! Bug reports or pull requests are welcome.\n\n## License\n\nThis project is released under the [MIT](http://opensource.org/licenses/MIT) license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fguillaumebriday%2Flaravel-blog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fguillaumebriday%2Flaravel-blog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fguillaumebriday%2Flaravel-blog/lists"}