Co-authored-by: jon brookes <marshyon@gmail.com> Reviewed-on: https://codeberg.org/headshed/share-lt/pulls/18
33 lines
728 B
PHP
33 lines
728 B
PHP
<?php
|
|
|
|
namespace App\Providers;
|
|
|
|
use App\Models\Entry;
|
|
use App\Observers\EntryObserver;
|
|
use Illuminate\Support\ServiceProvider;
|
|
use Illuminate\Support\Facades\File;
|
|
|
|
class AppServiceProvider extends ServiceProvider
|
|
{
|
|
/**
|
|
* Register any application services.
|
|
*/
|
|
public function register(): void
|
|
{
|
|
//
|
|
}
|
|
|
|
/**
|
|
* Bootstrap any application services.
|
|
*/
|
|
public function boot(): void
|
|
{
|
|
// Ensure the livewire-tmp directory exists
|
|
$livewireTmpPath = storage_path('framework/livewire-tmp');
|
|
if (!File::exists($livewireTmpPath)) {
|
|
File::makeDirectory($livewireTmpPath, 0755, true);
|
|
}
|
|
|
|
Entry::observe(EntryObserver::class);
|
|
}
|
|
}
|