I just can't figured out this issu; On a new Laravel project, I just can't use table method on DB class.
I use PhpStorm as EDI on OSX Sierra with Laravel 5.5.
Here my steps:
- In terminal: Laravel new testproject
- In terminal: composer install
- In terminal: php artisan make:controller testdummy
-
In EDI:
namespace App\Http\Controllers; use Illuminate\Http\Request; use Illuminate\Support\Facades\DB; class testdummy extends Controller { // public function index(){ DB::table('title')->insert([ 'label' => 'test1', 'desc' => 'test2', ]); } }
The 'table' have a warning popup in EDI that say:
'Method table not found in Illuminate\Support\Facades\DB'.
And no insertion are made to database.
Have you some hints on where to look next to help me find the problem?
thanks,
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire