Get syntax error, unexpected '{'
. When I delete, finally block it works. that is a GET method of RESTful service.
Route::resource('braining/firmware', 'Braining\FirmwareController',
['only' => ['index']]);
Controller
<?php
namespace App\Http\Controllers\Braining;
use App\Http\Requests;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
class FirmwareController extends Controller
{
public function index() {
try {
}
catch(Exception $e) {
}
finally {
}
}
}
Upgrade PHP to version
5.5
and the problem will go away.Source: http://php.net/manual/en/language.exceptions.php#language.exceptions.finally
You must be using PHP 5.4 or lower which does not have the finally implemented yet. Either remove it or upgrade the PHP to 5.5