This project aims to make using Laravel framework more organized and extensible.
- Laravel
>=11
Run the following Command in your cli.
composer require hassanzohdy/mongez
Once its done run the following command to create the config/mongez.php
file.
php artisan vendor:publish --provider="HZ\Illuminate\Mongez\Providers\MongezServiceProvider"
<?php
use HZ\Illuminate\Mongez\Translation\Traits\Translatable;
class MyClass
{
use Translatable;
public function index()
{
$this->transUsers('users.name'); // will translate from `Users` module and `users` file and the keyword is `name
$this->transUsers('usersGroups.permissions'); // will translate from `Users` module and `usersGroups` file and the keyword is `permissions
}
}
- 3.1.0 (29 Sep 2024)
- Update codebase to support laravel 11+
- Remove Carbon
setWeekStartsAt
andsetWeekEndsAt
as it was removed from carbon.
- 3.0.1 (29 Sep 2024)
- Update codebase to support laravel 10 with new mongodb elquent integration
- 2.24.2 (24 Dec 2023)
- Fixed request sql options is overwritten by current class sql options
- 2.24.1 (24 Nov 2022)
- Fixed empty array of date in
date_response
.
- Fixed empty array of date in
- 2.24.0 (24 Nov 2022)
- Enhanced Resource Manager Errors to display the resource class name.
- 2.23.5 (23 Oct 2022)
- Now generated model will have
casts
property instead ofdates
for date casting.
- Now generated model will have
- 2.23.4 (22 Oct 2022)
- Fixed defining the class namespace of
UTCDateTime
infunctions.php
file.
- Fixed defining the class namespace of
- 2.23.3 (22 Oct 2022)
- Fixed collectables to return proper array syntax instead of objects.
- 2.22.2 (28 Aug 2022)
- Fixed
ARRAYABLE_DATA
on listing as it is encoded to json.
- Fixed
- 2.22.1 (28 Aug 2022)
RepositoryManager.wrapMany
will return empty array without passing the collection to the resource if teh given array|collection is empty.
- 2.22.0 (28 Aug 2022)
config/mongez.php
config- Changed
misc
key todate
. - Changed
CarbonImmutable
toimmutable
underdate
key. - Added
week_starts_at
and defaults toSaturday
. - Added
week_ends_at
and defaults toFriday
.
- 2.21.0 (27 Aug 2022)
- Added
getPaginationInfo
in the repository manager. getPaginateInfo
now is deprecated and will be removed in V3.0.- Added
first
method to return the first matched element, takes the same array options aslistModels
and return one model.
- Added
- 2.20.0 (27 Aug 2022)
- Added
saveActionType
property to the repository, it can be used insetData
, and its value will depend on the current action,static::CREATE_ACTION
|static::UPDATE_ACTION
|static::PATCH_ACTION
.
- Added
- 2.18.0 (17 Aug 2022)
- Added
date_response
to format the given date totimestamp
humanTime
text
andformat
outputs. - Added
localized_date
to convert the given date into formatted date based on the locale code. - Used
date_response
in the resource manager to collect dates.
- Added
- 2.17.0 (15 Aug 2022)
- Added Aggregate Utilities
- 2.16.0 (14 Aug 2022)
- Added
date
anddate:between
filters toFILTER_BY
repository constant.
- Added
- 2.15.0 (12 Aug 2022)
- Added
carbonImmutable
feature to change thenow
function into immutable carbon instance.
- Added
- 2.14.0 (10 Aug 2022)
- Added
LOCATION_DATA
constant to resource manager to return proper geo location data.
- Added
- 2.12.0 (26 July 2022)
- Added
LOCALIZED_COLLECTABLE_DATA
constant to resource manager to localize data that are in array list.
- Added
- 2.11.0 (23 July 2022)
- Now
WHEN_AVAILABLE
in resource manager if set totrue
, it will strip out any missing value from the model so the resource will only return existing data without any default values for any missing data.
- Now
- 2.1.21 (28 Feb 2022)
- Fixed Multiple Trait Methods Alias
- 2.1.20 (28 Feb 2022)
- Fixed Missing Semi Colon
- 2.1.19 (28 Feb 2022)
- Fixed
Model
,Resource
andFilter
in the repository while creating child module to receive the child module name instead of the parent module.
- Fixed
- 2.1.17 (28 Feb 2022)
- Added
Translatable
trait.
- Added
- 2.1.14 (28 Feb 2022)
- Fixed generated
database
directory to beDatabase
.
- Fixed generated
See full documentation in the wiki page.