This commit is contained in:
+24
-1
@@ -188,7 +188,29 @@ class Services extends BaseService
|
||||
}
|
||||
|
||||
return new \App\Services\SchoolYearContextService(
|
||||
model(\App\Models\SchoolYearModel::class)
|
||||
model(\App\Models\SchoolYearModel::class),
|
||||
static::schoolYearAccessPolicy()
|
||||
);
|
||||
}
|
||||
|
||||
public static function schoolYearAccessPolicy(bool $getShared = true): \App\Services\SchoolYearAccessPolicy
|
||||
{
|
||||
if ($getShared) {
|
||||
return static::getSharedInstance('schoolYearAccessPolicy');
|
||||
}
|
||||
|
||||
return new \App\Services\SchoolYearAccessPolicy();
|
||||
}
|
||||
|
||||
public static function schoolYearViewData(bool $getShared = true): \App\Services\SchoolYearViewDataService
|
||||
{
|
||||
if ($getShared) {
|
||||
return static::getSharedInstance('schoolYearViewData');
|
||||
}
|
||||
|
||||
return new \App\Services\SchoolYearViewDataService(
|
||||
static::schoolYearContext(),
|
||||
static::schoolYearAccessPolicy()
|
||||
);
|
||||
}
|
||||
|
||||
@@ -238,6 +260,7 @@ class Services extends BaseService
|
||||
model(\App\Models\SchoolYearModel::class),
|
||||
model(\App\Models\SchoolYearClosingBatchModel::class),
|
||||
model(\App\Models\SchoolYearClosingItemModel::class),
|
||||
model(\App\Models\ConfigurationModel::class),
|
||||
static::schoolYearManagement(),
|
||||
\Config\Database::connect()
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user