Added the ability to manage a group of users.

This commit is contained in:
2023-07-16 19:21:09 +06:00
parent ba7e52f8ac
commit 4083e2ec5e
45 changed files with 1173 additions and 10 deletions

View File

@@ -6,6 +6,8 @@ namespace App\Services;
use App\ServiceResults\ServiceResultArray;
use App\ServiceResults\ServiceResultError;
use App\ServiceResults\ServiceResultSuccess;
use App\ServiceResults\StoreUpdateResult;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Http\Response;
abstract class Service
@@ -45,6 +47,11 @@ abstract class Service
return new ServiceResultSuccess($message);
}
final protected function resultStoreUpdateModel(Model $model, string $message = 'OK'): StoreUpdateResult
{
return new StoreUpdateResult($model, $message);
}
final protected function result(array $data = []): ServiceResultArray
{
return new ServiceResultArray(data: $data);