Migrate to HTMX (#114)

Dropped Livewire
Added HTMX
Added Blade code lint
Drop Mysql and Redis
Migrate to SQLite
This commit is contained in:
Saeed Vaziry
2024-03-06 17:02:59 +01:00
committed by GitHub
parent 5b2c419e91
commit b2083fc6b2
486 changed files with 8609 additions and 8707 deletions

View File

@ -8,11 +8,8 @@
class DeleteProject
{
public function delete(User $user, int $projectId): void
public function delete(User $user, Project $project): void
{
/** @var Project $project */
$project = $user->projects()->findOrFail($projectId);
if ($user->projects()->count() === 1) {
throw ValidationException::withMessages([
'project' => __('Cannot delete the last project.'),

View File

@ -26,7 +26,7 @@ private function validate(Project $project, array $input): void
'required',
'string',
'max:255',
Rule::unique('projects')->ignore($project->id),
Rule::unique('projects')->where('user_id', $project->user_id)->ignore($project->id),
],
])->validate();
}