1

I am working on an old Laravel project of Laravel Framework 5.5.43 , The models are there inside Model folder of app. I have created a model called Return inside that Model folder. But getting the following error while going to use that model in ReturnController, even in another.

This is the Return.php

<?php

namespace App\Model;

use Illuminate\Database\Eloquent\Model;

class Return extends Model
{

}

And this is the ReturnController.php

<?php

namespace App\Http\Controllers;

use App\Enums\OrderType;
se Carbon\Carbon;
use Illuminate\Http\Request;
use App\Model\Order;
use App\Model\Return;
use App\Services\SellService;

class ReturnController extends Controller
{

}

The error is given below...

Symfony \ Component \ Debug \ Exception \ FatalThrowableError (E_PARSE) Parse error: syntax error, unexpected 'Return' (T_RETURN), expecting identifier (T_STRING) or '{'

enter image description here

Uzzwal Dhali
  • 71
  • 1
  • 8

1 Answers1

5

Php thinks that it is return keyword. Just Change model name

Malkhazi Dartsmelidze
  • 4,783
  • 4
  • 16
  • 40