I am currently developing it at Ravel, but I will use the code below.
<?php
/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider with a group which
| contains the "web" middleware group. Now create something great!
|
*/
Route::get('/', function() {return redirect('/tasks');});
Route::get('/tasks', 'TaskController@index');
Route::post('/tasks', 'TaskController@store');
Route::delete('/tasks/{task}', 'TaskController@destroy');
\URL::forceScheme('https');
<?php
/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider with a group which
| contains the "web" middleware group. Now create something great!
|
*/
Route::get('/', function() {return redirect('/tasks');});
Route::get('/tasks', 'TaskController@index');
Route::post('/tasks', 'TaskController@store');
Route::delete('/tasks/{task}', 'TaskController@destroy');
\URL::forceScheme('https');
It seems that the code listed in your question should be single quote ('
, U+0027, APOSTROPHE) but left single quote ('
, U+2018, LEFT SINGLE QUOTATION MARK).(It seems that garbled code is posted on the website, and the editor and browser functions you are using can be converted without permission.)
In VS Code, the same display "syntax error, unexpected '@', expecting '', 'or')" (other errors are ignored…) is not garbled when uploading a question, but is actually incorrect in the source code.
Try replacing all left single quotes ('
) with the correct single quotes ('
) using editor bulk replacement.The difference in the display between the two is very difficult to understand, but if you change the font and review it, you will see it.
© 2024 OneMinuteCode. All rights reserved.