Forum video series - PHPUnit throws unauthenticated error

Posted 11 months ago by canadianlover

So I was following Jeffery's forum video series when I got to lesson 10. I initially ignored lesson 8 where I was supposed to update my TestCase.php file for exception handling. As you can see, I am also failing to pass validation. and I am getting an integrity constraint violation error Now when I run PHPUnit I get the following output.

''

There were 4 errors:

  1. Tests\Feature\CreateThreadsTest::guests_may_not_create_threads Illuminate\Auth\AuthenticationException: Unauthenticated.

/home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Auth/GuardHelpers.php:39 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Auth/AuthManager.php:294 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Auth/Middleware/Authenticate.php:57 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Auth/Middleware/Authenticate.php:41 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:148 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php:65 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:148 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php:49 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:148 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php:64 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:148 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php:37 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:148 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php:59 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:148 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:102 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Routing/Router.php:561 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Routing/Router.php:520 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Routing/Router.php:498 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:174 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:30 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php:30 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:148 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php:30 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:148 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php:27 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:148 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/CheckForMaintenanceMode.php:46 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:148 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:102 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:149 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:116 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/MakesHttpRequests.php:234 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/MakesHttpRequests.php:57 /home/vagrant/Code/forum/tests/Feature/CreateThreadsTest.php:12

  1. Tests\Feature\CreateThreadsTest::a_thread_requires_a_title Illuminate\Validation\ValidationException: The given data failed to pass validation.

/home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Foundation/Validation/ValidatesRequests.php:105 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Foundation/Validation/ValidatesRequests.php:55 /home/vagrant/Code/forum/app/Http/Controllers/ThreadController.php:44 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Routing/Controller.php:55 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php:44 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Routing/Route.php:203 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Routing/Route.php:160 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Routing/Router.php:559 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:30 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Routing/Middleware/SubstituteBindings.php:41 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:148 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Auth/Middleware/Authenticate.php:43 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:148 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php:65 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:148 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php:49 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:148 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php:64 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:148 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php:37 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:148 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php:59 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:148 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:102 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Routing/Router.php:561 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Routing/Router.php:520 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Routing/Router.php:498 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:174 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:30 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php:30 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:148 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php:30 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:148 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php:27 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:148 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/CheckForMaintenanceMode.php:46 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:148 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:102 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:149 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:116 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/MakesHttpRequests.php:234 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/MakesHttpRequests.php:84 /home/vagrant/Code/forum/tests/Feature/CreateThreadsTest.php:52 /home/vagrant/Code/forum/tests/Feature/CreateThreadsTest.php:30

  1. Tests\Feature\CreateThreadsTest::a_thread_requires_a_body Illuminate\Database\QueryException: SQLSTATE[23000]: Integrity constraint violation: 19 NOT NULL constraint failed: threads.body (SQL: insert into "threads" ("user_id", "title", "channel_id", "body", "updated_at", "created_at") values (1, Repellat quia voluptatibus et neque veritatis sit., 1, , 2018-01-07 22:24:19, 2018-01-07 22:24:19))

/home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Database/Connection.php:647 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Database/Connection.php:607 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Database/Connection.php:450 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Database/Connection.php:404 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Database/Query/Processors/Processor.php:32 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php:2131 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php:1236 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php:677 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php:642 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php:511 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php:724 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Support/helpers.php:878 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php:725 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php:1332 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php:1344 /home/vagrant/Code/forum/app/Http/Controllers/ThreadController.php:51 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Routing/Controller.php:55 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php:44 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Routing/Route.php:203 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Routing/Route.php:160 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Routing/Router.php:559 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:30 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Routing/Middleware/SubstituteBindings.php:41 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:148 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Auth/Middleware/Authenticate.php:43 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:148 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php:65 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:148 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php:49 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:148 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php:64 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:148 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php:37 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:148 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php:59 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:148 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:102 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Routing/Router.php:561 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Routing/Router.php:520 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Routing/Router.php:498 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:174 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:30 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php:30 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:148 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php:30 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:148 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php:27 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:148 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/CheckForMaintenanceMode.php:46 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:148 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:102 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:149 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:116 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/MakesHttpRequests.php:234 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/MakesHttpRequests.php:84 /home/vagrant/Code/forum/tests/Feature/CreateThreadsTest.php:52 /home/vagrant/Code/forum/tests/Feature/CreateThreadsTest.php:36

Caused by PDOException: SQLSTATE[23000]: Integrity constraint violation: 19 NOT NULL constraint failed: threads.body

/home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Database/Connection.php:449 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Database/Connection.php:640 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Database/Connection.php:607 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Database/Connection.php:450 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Database/Connection.php:404 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Database/Query/Processors/Processor.php:32 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php:2131 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php:1236 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php:677 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php:642 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php:511 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php:724 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Support/helpers.php:878 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php:725 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php:1332 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php:1344 /home/vagrant/Code/forum/app/Http/Controllers/ThreadController.php:51 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Routing/Controller.php:55 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php:44 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Routing/Route.php:203 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Routing/Route.php:160 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Routing/Router.php:559 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:30 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Routing/Middleware/SubstituteBindings.php:41 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:148 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Auth/Middleware/Authenticate.php:43 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:148 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php:65 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:148 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php:49 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:148 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php:64 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:148 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php:37 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:148 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php:59 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:148 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:102 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Routing/Router.php:561 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Routing/Router.php:520 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Routing/Router.php:498 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:174 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:30 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php:30 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:148 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php:30 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:148 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php:27 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:148 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/CheckForMaintenanceMode.php:46 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:148 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:102 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:149 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:116 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/MakesHttpRequests.php:234 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/MakesHttpRequests.php:84 /home/vagrant/Code/forum/tests/Feature/CreateThreadsTest.php:52 /home/vagrant/Code/forum/tests/Feature/CreateThreadsTest.php:36

  1. Tests\Feature\CreateThreadsTest::a_thread_requires_a_valid_channel Illuminate\Database\QueryException: SQLSTATE[23000]: Integrity constraint violation: 19 NOT NULL constraint failed: threads.channel_id (SQL: insert into "threads" ("user_id", "title", "channel_id", "body", "updated_at", "created_at") values (1, Quasi minus doloribus incidunt illo est., , Debitis adipisci et natus nisi eum totam suscipit. Error eveniet et veritatis ipsum. At doloremque omnis libero autem. Consequatur non non explicabo tempora porro., 2018-01-07 22:24:20, 2018-01-07 22:24:20))

/home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Database/Connection.php:647 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Database/Connection.php:607 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Database/Connection.php:450 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Database/Connection.php:404 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Database/Query/Processors/Processor.php:32 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php:2131 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php:1236 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php:677 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php:642 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php:511 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php:724 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Support/helpers.php:878 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php:725 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php:1332 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php:1344 /home/vagrant/Code/forum/app/Http/Controllers/ThreadController.php:51 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Routing/Controller.php:55 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php:44 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Routing/Route.php:203 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Routing/Route.php:160 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Routing/Router.php:559 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:30 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Routing/Middleware/SubstituteBindings.php:41 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:148 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Auth/Middleware/Authenticate.php:43 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:148 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php:65 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:148 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php:49 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:148 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php:64 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:148 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php:37 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:148 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php:59 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:148 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:102 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Routing/Router.php:561 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Routing/Router.php:520 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Routing/Router.php:498 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:174 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:30 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php:30 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:148 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php:30 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:148 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php:27 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:148 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/CheckForMaintenanceMode.php:46 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:148 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:102 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:149 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:116 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/MakesHttpRequests.php:234 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/MakesHttpRequests.php:84 /home/vagrant/Code/forum/tests/Feature/CreateThreadsTest.php:52 /home/vagrant/Code/forum/tests/Feature/CreateThreadsTest.php:43

Caused by PDOException: SQLSTATE[23000]: Integrity constraint violation: 19 NOT NULL constraint failed: threads.channel_id

/home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Database/Connection.php:449 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Database/Connection.php:640 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Database/Connection.php:607 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Database/Connection.php:450 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Database/Connection.php:404 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Database/Query/Processors/Processor.php:32 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php:2131 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php:1236 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php:677 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php:642 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php:511 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php:724 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Support/helpers.php:878 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php:725 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php:1332 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php:1344 /home/vagrant/Code/forum/app/Http/Controllers/ThreadController.php:51 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Routing/Controller.php:55 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php:44 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Routing/Route.php:203 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Routing/Route.php:160 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Routing/Router.php:559 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:30 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Routing/Middleware/SubstituteBindings.php:41 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:148 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Auth/Middleware/Authenticate.php:43 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:148 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php:65 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:148 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php:49 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:148 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php:64 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:148 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php:37 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:148 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php:59 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:148 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:102 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Routing/Router.php:561 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Routing/Router.php:520 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Routing/Router.php:498 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:174 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:30 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php:30 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:148 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php:30 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:148 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php:27 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:148 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/CheckForMaintenanceMode.php:46 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:148 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:102 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:149 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:116 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/MakesHttpRequests.php:234 /home/vagrant/Code/forum/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/MakesHttpRequests.php:84 /home/vagrant/Code/forum/tests/Feature/CreateThreadsTest.php:52 /home/vagrant/Code/forum/tests/Feature/CreateThreadsTest.php:43''

Here is my CreateThreadsTest.php file: '''<?php namespace Tests\Feature; use Illuminate\Foundation\Testing\DatabaseMigrations; use Tests\TestCase; class CreateThreadsTest extends TestCase { use DatabaseMigrations; /** @test / function guests_may_not_create_threads() { $this->withExceptionHandling(); $this->get('/threads/create') ->assertRedirect('/login'); $this->post('/threads', []) ->assertRedirect('/login'); } /* @test / function an_authenticated_user_can_create_new_forum_threads() { $this->signIn(); $thread = make('App\Thread'); $response = $this->post('/threads', $thread->toArray()); $this->get($response->headers->get('Location')) ->assertSee($thread->title) ->assertSee($thread->body); } /* @test / function a_thread_requires_a_title() { $this->publishThread(['title' => null]) ->assertSessionHasErrors('title'); } /* @test / function a_thread_requires_a_body() { $this->publishThread(['body' => null]) ->assertSessionHasErrors('body'); } /* @test */ function a_thread_requires_a_valid_channel() { factory('App\Channel', 2)->create(); $this->publishThread(['channel_id' => null]) ->assertSessionHasErrors('channel_id'); $this->publishThread(['channel_id' => 999]) ->assertSessionHasErrors('channel_id'); } protected function publishThread($overrides = []) { $this->withExceptionHandling()->signIn(); $thread = make('App\Thread', $overrides); return $this->post('/threads', $thread->toArray()); } }''' And here's my ThreadsController.php file to show I did the validation the way Jerrery instructs in the video: '''<?php

namespace App\Http\Controllers;

use App\Thread; use Illuminate\Http\Request;

class ThreadController extends Controller { /** * Display a listing of the resource. * * @return \Illuminate\Http\Response */ public function __construct() { $this->middleware('auth')->except(['index', 'show']); }

public function index()
{   $threads = Thread::latest()->get();
    return view('threads.index', compact('threads'));
}

/**
 * Show the form for creating a new resource.
 *
 * @return \Illuminate\Http\Response
 */
public function create()
{
    return view('threads.create');
}

/**
 * Store a newly created resource in storage.
 *
 * @param  \Illuminate\Http\Request  $request
 * @return \Illuminate\Http\Response
 */
public function store(Request $request)
{
    $this->validate($request, [
        'title' => 'required'

    ]);
    $thread = Thread::create([
        'user_id' => auth()->id(),
        'title' => request('title'),
        'channel_id' => request('channel_id'),
        'body' => request('body'),

    ]);
    return redirect($thread->path());
}


/**
 * Display the specified resource.
 *
 * @param  \App\Thead  $thead
 * @return \Illuminate\Http\Response
 */
public function show($channelId, Thread $thread)
{
    return view('threads.show', compact('thread'));
}

/**
 * Show the form for editing the specified resource.
 *
 * @param  \App\Thead  $thead
 * @return \Illuminate\Http\Response
 */
public function edit(Thead $thead)
{
    //
}

/**
 * Update the specified resource in storage.
 *
 * @param  \Illuminate\Http\Request  $request
 * @param  \App\Thead  $thead
 * @return \Illuminate\Http\Response
 */
public function update(Request $request, Thead $thead)
{
    //
}

/**
 * Remove the specified resource from storage.
 *
 * @param  \App\Thead  $thead
 * @return \Illuminate\Http\Response
 */
public function destroy(Thead $thead)
{
    //
}

}'''

Thanks for the help! If you need more code let me know. Thanks!

Please sign in or create an account to participate in this conversation.

Laracasts Mascot

Hi, Have We Met Yet?

Did you know that, in addition to the forum, Laracasts includes well over 1000 lessons on modern web development? All for the price of one lunch out per month.

Sign Me Up

Channels

Reply to

Use Markdown with GitHub-flavored code blocks.