Я использую Laravel степлер для целей изображения и после перехода на новую таблице, я пытаюсь artisan migrate:refresh
потом и я показал эту ошибку:Laravel класс не найден после переноса файла
[Symfony\Component\Debug\Exception\FatalErrorException] Class 'AddPhotoFieldsToStaffTable' not found
Однако, я могу видеть файл в папке моей миграции и используя php artisan migrate
, перед тем, как попытаться выполнить --refresh
, он успешно перенесен!
файл, который был сгенерирован является:
class AddPhotoFieldsToStaffTable extends Migration {
/**
* Make changes to the table.
*
* @return void
*/
public function up()
{
Schema::table('staff', function(Blueprint $table) {
$table->string('photo_file_name')->nullable();
$table->integer('photo_file_size')->nullable()->after('photo_file_name');
$table->string('photo_content_type')->nullable()->after('photo_file_size');
$table->timestamp('photo_updated_at')->nullable()->after('photo_content_type');
});
}
/**
* Revert the changes to the table.
*
* @return void
*/
public function down()
{
Schema::table('staff', function(Blueprint $table) {
$table->dropColumn('photo_file_name');
$table->dropColumn('photo_file_size');
$table->dropColumn('photo_content_type');
$table->dropColumn('photo_updated_at');
});
}
}
Любая помощь будет принята с благодарностью.