Skip to content

Commit

Permalink
core message lang file moved to rest api
Browse files Browse the repository at this point in the history
  • Loading branch information
hafijul233 committed May 9, 2024
1 parent 493293e commit c040d85
Show file tree
Hide file tree
Showing 14 changed files with 63 additions and 63 deletions.
10 changes: 5 additions & 5 deletions src/Http/Controllers/CityController.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public function store(StoreCityRequest $request): JsonResponse
}

return $this->created([

Check failure on line 76 in src/Http/Controllers/CityController.php

View workflow job for this annotation

GitHub Actions / phpstan

Call to an undefined method Laraflow\Local\Http\Controllers\CityController::created().
'message' => __('core::messages.resource.created', ['model' => 'City']),
'message' => __('restapi::messages.resource.created', ['model' => 'City']),
'id' => $city->id,
]);

Expand Down Expand Up @@ -140,7 +140,7 @@ public function update(UpdateCityRequest $request, string|int $id): JsonResponse
throw (new UpdateOperationException)->setModel(config('fintech.local.city_model'), $id);
}

return $this->updated(__('core::messages.resource.updated', ['model' => 'City']));
return $this->updated(__('restapi::messages.resource.updated', ['model' => 'City']));

} catch (ModelNotFoundException $exception) {

Expand Down Expand Up @@ -178,7 +178,7 @@ public function destroy(string|int $id)
throw (new DeleteOperationException())->setModel(config('fintech.local.city_model'), $id);
}

return $this->deleted(__('core::messages.resource.deleted', ['model' => 'City']));
return $this->deleted(__('restapi::messages.resource.deleted', ['model' => 'City']));

} catch (ModelNotFoundException $exception) {

Expand Down Expand Up @@ -214,7 +214,7 @@ public function restore(string|int $id)
throw (new RestoreOperationException())->setModel(config('fintech.local.city_model'), $id);
}

return $this->restored(__('core::messages.resource.restored', ['model' => 'City']));
return $this->restored(__('restapi::messages.resource.restored', ['model' => 'City']));

} catch (ModelNotFoundException $exception) {

Expand All @@ -240,7 +240,7 @@ public function export(IndexCityRequest $request): JsonResponse

$cityPaginate = Local::city()->export($inputs);

return $this->exported(__('core::messages.resource.exported', ['model' => 'City']));
return $this->exported(__('restapi::messages.resource.exported', ['model' => 'City']));

} catch (Exception $exception) {

Expand Down
10 changes: 5 additions & 5 deletions src/Http/Controllers/CountryController.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public function store(StoreCountryRequest $request): JsonResponse
}

return $this->created([
'message' => __('core::messages.resource.created', ['model' => 'Country']),
'message' => __('restapi::messages.resource.created', ['model' => 'Country']),
'id' => $country->id,
]);

Expand Down Expand Up @@ -141,7 +141,7 @@ public function update(UpdateCountryRequest $request, string|int $id): JsonRespo
throw (new UpdateOperationException)->setModel(config('fintech.local.country_model'), $id);
}

return $this->updated(__('core::messages.resource.updated', ['model' => 'Country']));
return $this->updated(__('restapi::messages.resource.updated', ['model' => 'Country']));

} catch (ModelNotFoundException $exception) {

Expand Down Expand Up @@ -179,7 +179,7 @@ public function destroy(string|int $id)
throw (new DeleteOperationException())->setModel(config('fintech.local.country_model'), $id);
}

return $this->deleted(__('core::messages.resource.deleted', ['model' => 'Country']));
return $this->deleted(__('restapi::messages.resource.deleted', ['model' => 'Country']));

} catch (ModelNotFoundException $exception) {

Expand Down Expand Up @@ -215,7 +215,7 @@ public function restore(string|int $id)
throw (new RestoreOperationException())->setModel(config('fintech.local.country_model'), $id);
}

return $this->restored(__('core::messages.resource.restored', ['model' => 'Country']));
return $this->restored(__('restapi::messages.resource.restored', ['model' => 'Country']));

} catch (ModelNotFoundException $exception) {

Expand All @@ -241,7 +241,7 @@ public function export(IndexCountryRequest $request): JsonResponse

$countryPaginate = Local::country()->export($inputs);

return $this->exported(__('core::messages.resource.exported', ['model' => 'Country']));
return $this->exported(__('restapi::messages.resource.exported', ['model' => 'Country']));

} catch (Exception $exception) {

Expand Down
10 changes: 5 additions & 5 deletions src/Http/Controllers/CurrencyController.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public function store(StoreCurrencyRequest $request): JsonResponse
}

return $this->created([
'message' => __('core::messages.resource.created', ['model' => 'Currency']),
'message' => __('restapi::messages.resource.created', ['model' => 'Currency']),
'id' => $currency->id,
]);

Expand Down Expand Up @@ -141,7 +141,7 @@ public function update(UpdateCurrencyRequest $request, string|int $id): JsonResp
throw (new UpdateOperationException)->setModel(config('fintech.local.currency_model'), $id);
}

return $this->updated(__('core::messages.resource.updated', ['model' => 'Currency']));
return $this->updated(__('restapi::messages.resource.updated', ['model' => 'Currency']));

} catch (ModelNotFoundException $exception) {

Expand Down Expand Up @@ -179,7 +179,7 @@ public function destroy(string|int $id)
throw (new DeleteOperationException())->setModel(config('fintech.local.currency_model'), $id);
}

return $this->deleted(__('core::messages.resource.deleted', ['model' => 'Currency']));
return $this->deleted(__('restapi::messages.resource.deleted', ['model' => 'Currency']));

} catch (ModelNotFoundException $exception) {

Expand Down Expand Up @@ -215,7 +215,7 @@ public function restore(string|int $id)
throw (new RestoreOperationException())->setModel(config('fintech.local.currency_model'), $id);
}

return $this->restored(__('core::messages.resource.restored', ['model' => 'Currency']));
return $this->restored(__('restapi::messages.resource.restored', ['model' => 'Currency']));

} catch (ModelNotFoundException $exception) {

Expand All @@ -241,7 +241,7 @@ public function export(IndexCurrencyRequest $request): JsonResponse

$currencyPaginate = Local::currency()->export($inputs);

return $this->exported(__('core::messages.resource.exported', ['model' => 'Currency']));
return $this->exported(__('restapi::messages.resource.exported', ['model' => 'Currency']));

} catch (Exception $exception) {

Expand Down
10 changes: 5 additions & 5 deletions src/Http/Controllers/RegionController.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public function store(StoreRegionRequest $request): JsonResponse
}

return $this->created([
'message' => __('core::messages.resource.created', ['model' => 'Region']),
'message' => __('restapi::messages.resource.created', ['model' => 'Region']),
'id' => $region->id,
]);

Expand Down Expand Up @@ -141,7 +141,7 @@ public function update(UpdateRegionRequest $request, string|int $id): JsonRespon
throw (new UpdateOperationException)->setModel(config('fintech.local.region_model'), $id);
}

return $this->updated(__('core::messages.resource.updated', ['model' => 'Region']));
return $this->updated(__('restapi::messages.resource.updated', ['model' => 'Region']));

} catch (ModelNotFoundException $exception) {

Expand Down Expand Up @@ -179,7 +179,7 @@ public function destroy(string|int $id)
throw (new DeleteOperationException())->setModel(config('fintech.local.region_model'), $id);
}

return $this->deleted(__('core::messages.resource.deleted', ['model' => 'Region']));
return $this->deleted(__('restapi::messages.resource.deleted', ['model' => 'Region']));

} catch (ModelNotFoundException $exception) {

Expand Down Expand Up @@ -215,7 +215,7 @@ public function restore(string|int $id)
throw (new RestoreOperationException())->setModel(config('fintech.local.region_model'), $id);
}

return $this->restored(__('core::messages.resource.restored', ['model' => 'Region']));
return $this->restored(__('restapi::messages.resource.restored', ['model' => 'Region']));

} catch (ModelNotFoundException $exception) {

Expand All @@ -241,7 +241,7 @@ public function export(IndexRegionRequest $request): JsonResponse

$regionPaginate = Local::region()->export($inputs);

return $this->exported(__('core::messages.resource.exported', ['model' => 'Region']));
return $this->exported(__('restapi::messages.resource.exported', ['model' => 'Region']));

} catch (Exception $exception) {

Expand Down
10 changes: 5 additions & 5 deletions src/Http/Controllers/StateController.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public function store(StoreStateRequest $request): JsonResponse
}

return $this->created([
'message' => __('core::messages.resource.created', ['model' => 'State']),
'message' => __('restapi::messages.resource.created', ['model' => 'State']),
'id' => $state->id,
]);

Expand Down Expand Up @@ -141,7 +141,7 @@ public function update(UpdateStateRequest $request, string|int $id): JsonRespons
throw (new UpdateOperationException)->setModel(config('fintech.local.state_model'), $id);
}

return $this->updated(__('core::messages.resource.updated', ['model' => 'State']));
return $this->updated(__('restapi::messages.resource.updated', ['model' => 'State']));

} catch (ModelNotFoundException $exception) {

Expand Down Expand Up @@ -179,7 +179,7 @@ public function destroy(string|int $id)
throw (new DeleteOperationException())->setModel(config('fintech.local.state_model'), $id);
}

return $this->deleted(__('core::messages.resource.deleted', ['model' => 'State']));
return $this->deleted(__('restapi::messages.resource.deleted', ['model' => 'State']));

} catch (ModelNotFoundException $exception) {

Expand Down Expand Up @@ -215,7 +215,7 @@ public function restore(string|int $id)
throw (new RestoreOperationException())->setModel(config('fintech.local.state_model'), $id);
}

return $this->restored(__('core::messages.resource.restored', ['model' => 'State']));
return $this->restored(__('restapi::messages.resource.restored', ['model' => 'State']));

} catch (ModelNotFoundException $exception) {

Expand All @@ -241,7 +241,7 @@ public function export(IndexStateRequest $request): JsonResponse

$statePaginate = Local::state()->export($inputs);

return $this->exported(__('core::messages.resource.exported', ['model' => 'State']));
return $this->exported(__('restapi::messages.resource.exported', ['model' => 'State']));

} catch (Exception $exception) {

Expand Down
10 changes: 5 additions & 5 deletions src/Http/Controllers/SubregionController.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public function store(StoreSubregionRequest $request): JsonResponse
}

return $this->created([
'message' => __('core::messages.resource.created', ['model' => 'Subregion']),
'message' => __('restapi::messages.resource.created', ['model' => 'Subregion']),
'id' => $subregion->id,
]);

Expand Down Expand Up @@ -141,7 +141,7 @@ public function update(UpdateSubregionRequest $request, string|int $id): JsonRes
throw (new UpdateOperationException)->setModel(config('fintech.local.subregion_model'), $id);
}

return $this->updated(__('core::messages.resource.updated', ['model' => 'Subregion']));
return $this->updated(__('restapi::messages.resource.updated', ['model' => 'Subregion']));

} catch (ModelNotFoundException $exception) {

Expand Down Expand Up @@ -179,7 +179,7 @@ public function destroy(string|int $id)
throw (new DeleteOperationException())->setModel(config('fintech.local.subregion_model'), $id);
}

return $this->deleted(__('core::messages.resource.deleted', ['model' => 'Subregion']));
return $this->deleted(__('restapi::messages.resource.deleted', ['model' => 'Subregion']));

} catch (ModelNotFoundException $exception) {

Expand Down Expand Up @@ -215,7 +215,7 @@ public function restore(string|int $id)
throw (new RestoreOperationException())->setModel(config('fintech.local.subregion_model'), $id);
}

return $this->restored(__('core::messages.resource.restored', ['model' => 'Subregion']));
return $this->restored(__('restapi::messages.resource.restored', ['model' => 'Subregion']));

} catch (ModelNotFoundException $exception) {

Expand All @@ -241,7 +241,7 @@ public function export(IndexSubregionRequest $request): JsonResponse

$subregionPaginate = Local::subregion()->export($inputs);

return $this->exported(__('core::messages.resource.exported', ['model' => 'Subregion']));
return $this->exported(__('restapi::messages.resource.exported', ['model' => 'Subregion']));

} catch (Exception $exception) {

Expand Down
10 changes: 5 additions & 5 deletions src/Http/Controllers/TownController.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public function store(StoreTownRequest $request): JsonResponse
}

return $this->created([
'message' => __('core::messages.resource.created', ['model' => 'Town']),
'message' => __('restapi::messages.resource.created', ['model' => 'Town']),
'id' => $town->id,
]);

Expand Down Expand Up @@ -141,7 +141,7 @@ public function update(UpdateTownRequest $request, string|int $id): JsonResponse
throw (new UpdateOperationException)->setModel(config('fintech.local.town_model'), $id);
}

return $this->updated(__('core::messages.resource.updated', ['model' => 'Town']));
return $this->updated(__('restapi::messages.resource.updated', ['model' => 'Town']));

} catch (ModelNotFoundException $exception) {

Expand Down Expand Up @@ -179,7 +179,7 @@ public function destroy(string|int $id)
throw (new DeleteOperationException())->setModel(config('fintech.local.town_model'), $id);
}

return $this->deleted(__('core::messages.resource.deleted', ['model' => 'Town']));
return $this->deleted(__('restapi::messages.resource.deleted', ['model' => 'Town']));

} catch (ModelNotFoundException $exception) {

Expand Down Expand Up @@ -215,7 +215,7 @@ public function restore(string|int $id)
throw (new RestoreOperationException())->setModel(config('fintech.local.town_model'), $id);
}

return $this->restored(__('core::messages.resource.restored', ['model' => 'Town']));
return $this->restored(__('restapi::messages.resource.restored', ['model' => 'Town']));

} catch (ModelNotFoundException $exception) {

Expand All @@ -241,7 +241,7 @@ public function export(IndexTownRequest $request): JsonResponse

$townPaginate = Local::town()->export($inputs);

return $this->exported(__('core::messages.resource.exported', ['model' => 'Town']));
return $this->exported(__('restapi::messages.resource.exported', ['model' => 'Town']));

} catch (Exception $exception) {

Expand Down
8 changes: 4 additions & 4 deletions src/Models/City.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,10 @@ public function getLinksAttribute()
$primaryKey = $this->getKey();

$links = [
'show' => action_link(route('local.cities.show', $primaryKey), __('core::messages.action.show'), 'get'),
'update' => action_link(route('local.cities.update', $primaryKey), __('core::messages.action.update'), 'put'),
'destroy' => action_link(route('local.cities.destroy', $primaryKey), __('core::messages.action.destroy'), 'delete'),
'restore' => action_link(route('local.cities.restore', $primaryKey), __('core::messages.action.restore'), 'post'),
'show' => action_link(route('local.cities.show', $primaryKey), __('restapi::messages.action.show'), 'get'),
'update' => action_link(route('local.cities.update', $primaryKey), __('restapi::messages.action.update'), 'put'),
'destroy' => action_link(route('local.cities.destroy', $primaryKey), __('restapi::messages.action.destroy'), 'delete'),
'restore' => action_link(route('local.cities.restore', $primaryKey), __('restapi::messages.action.restore'), 'post'),
];

if ($this->getAttribute('deleted_at') == null) {
Expand Down
8 changes: 4 additions & 4 deletions src/Models/Country.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,10 @@ public function getLinksAttribute()
$primaryKey = $this->getKey();

$links = [
'show' => action_link(route('local.countries.show', $primaryKey), __('core::messages.action.show'), 'get'),
'update' => action_link(route('local.countries.update', $primaryKey), __('core::messages.action.update'), 'put'),
'destroy' => action_link(route('local.countries.destroy', $primaryKey), __('core::messages.action.destroy'), 'delete'),
'restore' => action_link(route('local.countries.restore', $primaryKey), __('core::messages.action.restore'), 'post'),
'show' => action_link(route('local.countries.show', $primaryKey), __('restapi::messages.action.show'), 'get'),
'update' => action_link(route('local.countries.update', $primaryKey), __('restapi::messages.action.update'), 'put'),
'destroy' => action_link(route('local.countries.destroy', $primaryKey), __('restapi::messages.action.destroy'), 'delete'),
'restore' => action_link(route('local.countries.restore', $primaryKey), __('restapi::messages.action.restore'), 'post'),
];

if ($this->getAttribute('deleted_at') == null) {
Expand Down
8 changes: 4 additions & 4 deletions src/Models/Currency.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,10 @@ public function getLinksAttribute()
$primaryKey = $this->getKey();

$links = [
'show' => action_link(route('local.currencies.show', $primaryKey), __('core::messages.action.show'), 'get'),
'update' => action_link(route('local.currencies.update', $primaryKey), __('core::messages.action.update'), 'put'),
'destroy' => action_link(route('local.currencies.destroy', $primaryKey), __('core::messages.action.destroy'), 'delete'),
'restore' => action_link(route('local.currencies.restore', $primaryKey), __('core::messages.action.restore'), 'post'),
'show' => action_link(route('local.currencies.show', $primaryKey), __('restapi::messages.action.show'), 'get'),
'update' => action_link(route('local.currencies.update', $primaryKey), __('restapi::messages.action.update'), 'put'),
'destroy' => action_link(route('local.currencies.destroy', $primaryKey), __('restapi::messages.action.destroy'), 'delete'),
'restore' => action_link(route('local.currencies.restore', $primaryKey), __('restapi::messages.action.restore'), 'post'),
];

if ($this->getAttribute('deleted_at') == null) {
Expand Down
8 changes: 4 additions & 4 deletions src/Models/Region.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,10 @@ public function getLinksAttribute()
$primaryKey = $this->getKey();

$links = [
'show' => action_link(route('local.regions.show', $primaryKey), __('core::messages.action.show'), 'get'),
'update' => action_link(route('local.regions.update', $primaryKey), __('core::messages.action.update'), 'put'),
'destroy' => action_link(route('local.regions.destroy', $primaryKey), __('core::messages.action.destroy'), 'delete'),
'restore' => action_link(route('local.regions.restore', $primaryKey), __('core::messages.action.restore'), 'post'),
'show' => action_link(route('local.regions.show', $primaryKey), __('restapi::messages.action.show'), 'get'),
'update' => action_link(route('local.regions.update', $primaryKey), __('restapi::messages.action.update'), 'put'),
'destroy' => action_link(route('local.regions.destroy', $primaryKey), __('restapi::messages.action.destroy'), 'delete'),
'restore' => action_link(route('local.regions.restore', $primaryKey), __('restapi::messages.action.restore'), 'post'),
];

if ($this->getAttribute('deleted_at') == null) {
Expand Down
Loading

0 comments on commit c040d85

Please sign in to comment.