michellevanderbeeks
michellevanderbeeks

Reputation: 103

Laravel syntax error in variable while nothing changed

I am making a mobile app with a username-password login screen. Yesterday i left my computer on when i was done with work. Today i sit behind my computer and try to log in. Strange thing is i get this error:

{"error":{"type":"Symfony\\Component\\Debug\\Exception\\FatalErrorException","message":"syntax error, unexpected '$credentials' (T_VARIABLE)","file":"C:\\Google Drive\\htdocs\\laravel4_test4\\app\\controllers\\MobileController.php","line":18}}

Weirdest thing of all is i haven't chaged any code since yesterday. This is the part of my controller code that seems to give the syntax error.

public function login(){

  $input = Input::all()
  $credentials = array('username' => $input['name'], 'password' => $input['password']);

  if(Auth::attempt($credentials)){

    // HERE COMES THE REST

There seems to be nothing wrong with the code. Does anyone know why this could be happening?

Upvotes: 0

Views: 96

Answers (1)

Emi
Emi

Reputation: 1018

You missed a semicolon after $input = Input::all()

$input = Input::all();

Upvotes: 4

Related Questions