{"id":14974574,"url":"https://github.com/pjijin/laravel-common-errors-cheatsheet","last_synced_at":"2025-10-20T04:32:27.256Z","repository":{"id":102594398,"uuid":"173053525","full_name":"PJijin/Laravel-Common-Errors-Cheatsheet","owner":"PJijin","description":"📋Laravel Common Error Cheatsheet","archived":false,"fork":false,"pushed_at":"2019-03-01T12:19:14.000Z","size":16,"stargazers_count":9,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-01T04:31:43.097Z","etag":null,"topics":["error-messages","error-pages","errors","laravel","laravel5","laravel55","laravel56"],"latest_commit_sha":null,"homepage":"https://pjijin.github.io/Laravel-Common-Errors-Cheatsheet/","language":null,"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/PJijin.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":"2019-02-28T06:20:28.000Z","updated_at":"2019-10-25T04:17:36.000Z","dependencies_parsed_at":null,"dependency_job_id":"28e1dd17-e8a3-4487-97b1-4344caa0e375","html_url":"https://github.com/PJijin/Laravel-Common-Errors-Cheatsheet","commit_stats":{"total_commits":11,"total_committers":1,"mean_commits":11.0,"dds":0.0,"last_synced_commit":"0cfddbdcb9a3c087a1aab69992dae5ed1aae255b"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PJijin%2FLaravel-Common-Errors-Cheatsheet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PJijin%2FLaravel-Common-Errors-Cheatsheet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PJijin%2FLaravel-Common-Errors-Cheatsheet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PJijin%2FLaravel-Common-Errors-Cheatsheet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PJijin","download_url":"https://codeload.github.com/PJijin/Laravel-Common-Errors-Cheatsheet/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238471970,"owners_count":19478138,"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":["error-messages","error-pages","errors","laravel","laravel5","laravel55","laravel56"],"created_at":"2024-09-24T13:50:45.671Z","updated_at":"2025-10-20T04:32:27.205Z","avatar_url":"https://github.com/PJijin.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Laravel Common Errors Cheatsheet\n\n⚡  Laravel Common Error Cheatsheet for beginners. \n\n🔍 Use Ctrl + F to search for error \n\n🥳 Feel free to contribute\n\n---\n\n **Error 1**\n\n    `SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES) (SQL: select count(*) as aggregate from` users`where`email `= xxx@xx.com)`\n\n**Solution**\n\nMake sure the database details are correct on the .env file\n\nDB_CONNECTION=mysql\nDB_HOST=127.0.0.1\nDB_PORT=3306\nDB_DATABASE=your_database_name\nDB_USERNAME=your_database_username\nDB_PASSWORD=your_database_password\n\n---\n\n**Error 2**\n\n`419 sorry your session has expired. please refresh and try again`\n\nor\n\n`TokenMismatchException`\n\n**Solution**\n\nThe error basically occurs when there is no csrf token field on the form post. Make sure you have  {{ csrf_filed() }} on the blade form.\n\n---\n\n**Error 3**\n \n`404\nSorry, the page you are looking for could not be found.`\n\nor\n\n`NotFoundHttpException`\n\n**Solution**\n\nYou have not added the Route. Go to routes/web.php and specify the route.\n\n---\n\n**Error 4**\n \n`405 Method not allowed`\n\nor \n\n`MethodNotAllowedHttpException`\n\n\n**Solution**\n\nYou have not added the Route or it is not in Route::post method . Go to routes/web.php and specify the route or modify the route to post method.\n\n---\n\n**Error 5**\n\n`Class App\\Http\\Controllers\\HomeController does not exist`\n\n**Solution**\n\nYou have not created the HomeController file. Go to your terminal and run\n `php artisan make:controller HomeController`\n \n ---\n \n **Error 6** \n\n`Method App\\Http\\Controllers\\HomeController::test does not exist.`\n\n**Solution**\n\nYou have not created the specified method on HomeController. Here the test method is not added in HomeController. \n\n---\n\n**Error 7** \n\n`View [sample] not found.`\n\n**Solution**\n\nThe template blade file is not present on the specified directory. Make sure you have created the sample.blade.php file on resources/views folder.\n\n---\n\n**Error 8** \n\n`Class 'App\\Http\\Controllers\\admin\\Auth' not found `\n\n**Solution**\n\nTo use the Auth Namespace you need to import it at the top. \n`Use Auth;`\n\n---\n\n**Error 9** \n\n`SQLSTATE[HY000] General error: 1364 Field 'email' doesn't have a default value`\n\n**Solution**\n\nYou need to pass the value to the Model at the time of creating new record. Or you need to make the field nullable in migration -\u003enullable and run \n`php artisan migrate:fresh`\n\n---\n\n**Error 10** \n\n`ModelNotFoundException`\n\n**Solution**\n\nThis exception is thrown if you try to access the data that does not exist. Generally thrown by findOrFail() or firstOrFail()\n\n---\n\n**Error 11**\n\n`Cannot end a section without first starting one`\n\nThis error will be at the blade file. Check that you have a starting of section Eg: `@section('content')`\n\n----\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpjijin%2Flaravel-common-errors-cheatsheet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpjijin%2Flaravel-common-errors-cheatsheet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpjijin%2Flaravel-common-errors-cheatsheet/lists"}