Skip to content

Tag: laravel

“405 Method not allowed” in Laravel 5.6.14

I am just learning laravel resource methods to build a basic API. Below is the code of my api.php file that shows all the API routes. This works perfectly on get and delete methods. But for Post method, it is throwing error “405 Method not allowed”. I am using Postman to test the API calls. To be …

Laravel Jobs Serialization of ‘Closure’ is not allowed

I would like to send Data to a NewsletterStore Job. But it’s failing with the following error. Any suggestions? I also tried to remove the SerializesModels Models trait. Without any success. Error Controller Job Answer Request is not serializable there is a workaround what you are trying to achieve Your…

Laravel Storage file encoding

I’m trying to save text file as UTF-8 by using Laravel’s Storage facade. Unfortunately couldn’t find a way and it saves as us-ascii. How can I save as UTF-8? Currently I’m using following code to …

Laravel 5.6 Custom method to call a view

I have application in laravel.When I try to access a custom method using URL localhost/blog/public/contact/myownview it doesn’t give any output. I want to redirect it to view called video. namespace …

Laravel Users follow

I have this error SQLSTATE[23000]: Integrity constraint violation: 1052 Column ‘id’ in field list is ambiguous (SQL: select id, followers.user_id as pivot_user_id, followers.follows_id as pivot_follows_id, followers.created_at as pivot_created_at, followers.updated_at as pivot_updated_at from user…