What does this mean? “Parse error: syntax error, unexpected T_PAAMAYIM_NEKUDOTAYIM”

前端 未结 8 1695
囚心锁ツ
囚心锁ツ 2020-11-28 09:34

T_PAAMAYIM_NEKUDOTAYIM sounds really exotic, but most certainly absolutely nonsense to me. I traced it all down to this lines of code:



        
8条回答
  •  旧时难觅i
    2020-11-28 10:27

    For anyone using Laravel. I was having the same error on Laravel 7.0. The error looked like this

    syntax error, unexpected '::' (T_PAAMAYIM_NEKUDOTAYIM), expecting ';' or ','
    

    It was in my Routes\web.php file, which looked like this

    use Illuminate\Support\Facades\Route;
    use Illuminate\Http\Request;
    use // this was an extra **use** statement that gave me the error
    
    Route::get('/', function () {
        return view('save-online.index');
    })->name('save-online.index');
    

提交回复
热议问题