Post to Laravel 5 from 3rd party API

I’m using Laravel 5 to build a basic app.

I’m using a third party SMS gateway which takes an SMS and POST the results to my app. I’m testing it locally using Postman for Chrome, and

My Problem:
When I try to POST to my app, I get a “whoops” error from Laravel, status code 405.

My Hunch:
I have a feeling this is because of default CSRF failing. The request is coming from outside of my app’s ecosystem.

In my routes I have:

Route::post('/sms/', 'SMSController@create');


public function create(Request $request)
       //keeping it simple for now
        return view('hello');

Question: Is this the problem, and if so, how do I disable CSRF from one route only.

Many thanks!

Source: laravel

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.