Commit dbb4030d authored by Ola Hneini's avatar Ola Hneini Committed by Yassine Doghri
Browse files

feat: add permanent delete feature for podcasts 🎉

closes #89
parent 9548337a
Loading
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -183,10 +183,6 @@ class AddPodcasts extends Migration
            'updated_at' => [
                'type' => 'DATETIME',
            ],
            'deleted_at' => [
                'type' => 'DATETIME',
                'null' => true,
            ],
        ]);

        $this->forge->addPrimaryKey('id');
+0 −6
Original line number Diff line number Diff line
@@ -127,12 +127,6 @@ class AuthSeeder extends Seeder
            ],
            [
                'name' => 'delete',
                'description' =>
                    'Delete a podcast without removing it from database',
                'has_permission' => ['superadmin'],
            ],
            [
                'name' => 'delete_permanently',
                'description' => 'Delete any podcast from the database',
                'has_permission' => ['superadmin'],
            ],
+0 −1
Original line number Diff line number Diff line
@@ -81,7 +81,6 @@ use RuntimeException;
 * @property int $updated_by
 * @property Time $created_at;
 * @property Time $updated_at;
 * @property Time|null $deleted_at;
 *
 * @property Episode[] $episodes
 * @property Person[] $persons
+0 −5
Original line number Diff line number Diff line
@@ -73,11 +73,6 @@ class PodcastModel extends Model
     */
    protected $returnType = Podcast::class;

    /**
     * @var bool
     */
    protected $useSoftDeletes = true;

    /**
     * @var bool
     */
+3 −0
Original line number Diff line number Diff line
@@ -127,6 +127,9 @@ $routes->group(
                    'as' => 'podcast-delete',
                    'filter' => 'permission:podcasts-delete',
                ]);
                $routes->post('delete', 'PodcastController::attemptDelete/$1', [
                    'filter' => 'permission:podcasts-delete',
                ]);

                $routes->group('persons', function ($routes): void {
                    $routes->get('/', 'PodcastPersonController/$1', [
Loading