Files
hoshal-market/app/Models/Collection.php
Mekan1206 b13d61b342 Update project dependencies and configuration
- Added Filament and Tailwind CSS dependencies in composer.json.
- Updated AGENTS.md to include new package versions.
- Modified boost.json to include tailwindcss-development skill.
- Updated DatabaseSeeder to create an admin user with a password.
- Changed the root route to use HomeController instead of a closure.
- Adjusted permissions for .gitignore in storage directory.
2026-06-04 21:30:06 +05:00

21 lines
478 B
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Facades\Storage;
class Collection extends Model
{
protected $fillable = ['title', 'subtitle', 'image', 'order', 'is_active'];
protected static function booted(): void
{
static::deleting(function (Collection $collection) {
if ($collection->image) {
Storage::disk('public')->delete($collection->image);
}
});
}
}