api = $api; } public function handle(): void { $this->api->courses()->each(function ($course) { Course::create(['nami_id' => $course->id, 'name' => $course->name]); }); } public function restore(): void { DB::table('courses')->delete(); } }