I have table indexpage but still have this error! this is my code:
public function up() { Schema::create('index', function (Blueprint $table) { $table->increments('id'); $table->text('about'); $table->string('video'); $table->timestamps(); }); }
model:
class Index extends Model { protected $fillable = [ 'about' ,'video' ]; }
where indices come from?
Advertisement
Answer
By convention, the “snake case”, plural name of the class will be used as the table name unless another name is explicitly specified.
In your Index Model, you need to explicitly specified the table name
class Index extends Models { protected $table = 'index'; ... }