Thursday, March 30, 2017

Laravel FatalErrorException

I created a new view, route and controller in laravel and when i go to access the view i get an error, all other views are fine.

Error FatalErrorException in shopsalescontroller.php line 11: syntax error, unexpected 'class' (T_CLASS), expecting ',' or ';'

this is my shop sales controller:

   <?php
   namespace App\Http\Controllers;
   use Illuminate\Http\Request;
   use App\Http\Requests;
   use App\shopsales

   class shopsalescontroller extends Controller : (line 11)
    {
     public function index()
      {
       $storeNum = request('storeNum');
       $results = shopsales::where('StoreNumber','=',$storeNum)->get();
       return view('shopSales',compact('results'));
      }
    }

PHP version 5.6.3 Zend engine v2.6.0

Laravel framework version 5.2.45



via PA060

Advertisement