My directory structure is CBridge->app->Models->Companies
In companies.php I have below code
<?php
namespace App\Models\Companies;
use Illuminate\Database\Eloquent\Model;
// Model for Companies Table
class Companies extends Model
{
protected $connection = 'mysql';
protected $table = 'Companies';
protected $primaryKey = 'CompanyId';
public $timestamps = false;
public $incrementing = false;
protected $fillable = array(
'CompanyName',
'CompanyDomain'
);
public function __construct()
{
}
}
In my cmd I am at CBridge directory. CBridge> Php artisan tinker
App\Models\Companies\Companies:all();
Above command gives me error. not found in eval()' d code on line 1.
Please help. My table name in Companies.
Weird: Sometimes the command mentioned above starts working and sometimes it starts showing above error. Very confused.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community