projects tablosunda softdelete oluşturmak istiyorum bütün ayarları yaptım ama fresh yaparken hata alıyorum
projects table
public function up()
{
Schema::create('projects', function (Blueprint $table) {
$table->id();
$table->string('name');
$table->softDelets();
$table->timestamps();
});
}
Model Dosyası
namespace App;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
class Project extends Model
{
use SoftDeletes;
public function members()
{
return $this->belongsToMany('App\Project')->withTimestamps();
}
}
Çıkan Hata
BadMethodCallException
Method Illuminate\Database\Schema\Blueprint::softDelets does not exist.
at vendor/laravel/framework/src/Illuminate/Support/Traits/Macroable.php:103
99| */
100| public function __call($method, $parameters)
101| {
102| if (! static::hasMacro($method)) {
> 103| throw new BadMethodCallException(sprintf(
104| 'Method %s::%s does not exist.', static::class, $method
105| ));
106| }
107|
• Bad Method Call: Did you mean Illuminate\Database\Schema\Blueprint::softDeletes() ?
1 database/migrations/2020_06_27_120736_create_projects_table.php:18
Illuminate\Database\Schema\Blueprint::__call()
+4 vendor frames
6 database/migrations/2020_06_27_120736_create_projects_table.php:20
Illuminate\Support\Facades\Facade::__callStatic()