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
  • 17,110
  • 7
  • 81
  • 119
Artyomska
  • 1,309
  • 5
  • 26
  • 53

1 Answers1

0

T_SL references to <<.

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

mega6382
  • 9,211
  • 17
  • 48
  • 69
aydinugur
  • 1,208
  • 2
  • 14
  • 21