Add file upload function. modify paramiter FILESYSTEM_DISK=public in file .env

This commit is contained in:
paoloGuagnano
2024-02-11 18:25:29 +01:00
parent f69f2ba046
commit 0cedec9711
10 changed files with 240 additions and 3 deletions

View File

@@ -0,0 +1,66 @@
<?php
namespace App\Policies;
use App\Models\User;
use App\Models\file;
use Illuminate\Auth\Access\Response;
class FilePolicy
{
/**
* Determine whether the user can view any models.
*/
public function viewAny(User $user): bool
{
//
}
/**
* Determine whether the user can view the model.
*/
public function view(User $user, file $file): bool
{
//
}
/**
* Determine whether the user can create models.
*/
public function create(User $user): bool
{
//
}
/**
* Determine whether the user can update the model.
*/
public function update(User $user, file $file): bool
{
//
}
/**
* Determine whether the user can delete the model.
*/
public function delete(User $user, file $file): bool
{
//
}
/**
* Determine whether the user can restore the model.
*/
public function restore(User $user, file $file): bool
{
//
}
/**
* Determine whether the user can permanently delete the model.
*/
public function forceDelete(User $user, file $file): bool
{
//
}
}