delete(); $json = File::get('database/data/resources.json'); $data = json_decode($json); foreach ($data as $item){ Resource::create( array( 'id' => $item->Resouce_Id, 'title' => $item->Title, 'body' => $item->Body, 'attach_path' => $item->Attach_Path, 'category_id' => $item->Category, 'created_by' => '1' ) ); } } }