<?php

$app->options('{route:.*}', function () {
	return response()->json();
});
$app->get('users/login', ['as' => 'users.login', 'uses' => 'UserController@login']);
resource('users', 'UserController');
resource('devices', 'DeviceController');
resource('templates', 'TemplateController');
$app->put('attributes/reorder', ['as' => 'attributes.reorder', 'uses' => 'AttributeController@reorder']);
resource('attributes', 'AttributeController');

<?php

$app->get('users/login', ['as' => 'users.login', 'uses' => 'UserController@login']);
resource('users', 'UserController');
resource('devices', 'DeviceController');
resource('templates', 'TemplateController');
$app->put('attributes/reorder', ['as' => 'attributes.reorder', 'uses' => 'AttributeController@reorder']);
resource('attributes', 'AttributeController');

--- 
+++ 
@@ -1,5 +1,8 @@
 <?php
 
+$app->options('{route:.*}', function () {
+	return response()->json();
+});
 $app->get('users/login', ['as' => 'users.login', 'uses' => 'UserController@login']);
 resource('users', 'UserController');
 resource('devices', 'DeviceController');
Add response for OPTIONS requests.
