This commit is contained in:
2023-07-28 12:18:13 +02:00
parent f5977c1b5d
commit d943e81da4
14 changed files with 209 additions and 69 deletions

View File

@@ -8,7 +8,6 @@ use App\Http\Resources\ProjectCollection;
use App\Http\Resources\ProjectResource;
use App\Models\Project;
use App\Repository\Interfaces\ProjectRepository as ProjectRepositoryInterface;
use Illuminate\Database\Query\Builder;
use Illuminate\Support\Collection;
class ProjectRepository implements ProjectRepositoryInterface
@@ -104,11 +103,7 @@ class ProjectRepository implements ProjectRepositoryInterface
else
$toSave['update_date'] = null;
if (
isset($data['visible']) &&
in_array($data['visible'], ['yes', 'on', 1, true])
) $toSave['visible'] = true;
else $toSave['visible'] = false;
$toSave['visible'] = $data['visible'];
return $toSave;
}