0

I am trying to create a backend REST API using php Laravel, but I encountered the strange error from my title in the following code:

Route::get('/', function () {
    return view('main');
});

 Route::group(['prefix' => 'api'], function () {
            // Authentication Routes
            Route::post('/login', 'Auth\LoginController@login');
            Route::post('/logout', 'Auth\LoginController@logout');
            Route::post('/register', 'Auth\RegisterController@store');
            Route::post('/register/student', 'Auth\RegisterStudentController@store');


            // Model routes
            Route::resource('/internships', 'InternshipController');
            Route::resource('/companies', 'CompanyController');
            Route::resource('/students', 'StudentController');
        });

At the following line:

Route::post('/register', 'Auth\RegisterController@store');

I'm getting this error:

Syntax error, unexpected '<<' (T_SL)

The problem is that I don't have any << in this line. I tried to delete the line, but the error moves just before });, on the last ;.

What am I doing wrong?

sepehr
  • 15,475
  • 7
  • 79
  • 114
Artyomska
  • 1,181
  • 4
  • 20
  • 44

1 Answers1

0

T_SL references to <<.

You should not use tabs or spaces before you use END;

mega6382
  • 8,889
  • 16
  • 47
  • 67
aydinugur
  • 1,202
  • 2
  • 14
  • 21