Repository Configurations
Repository configurations are used to define default behaviors or values, also it locates all defined repositories in the project.
General Repository Configurations#
Repository has some featuring Configurations for more customrimzation, these configurations are located in config/mongez.php
Let's go for it one by one
- cache
- driver: Set the cache driver name, can be any of Laravel Cache Drivers.
- publishedColumn: Defines the
booleanpublished column name to be used with the following methods:- listPublished: list all published records.
- getPublished: Get the record, only if its
publsihedcolumn is true.Default value is
published
- uploads
- uploadsDirectory: Determine the base uploads directory name that will contain all repositories uploads.
Please note that uploads are using the Uploaded File StoreAs method , which appends the uploads directory to the base storage path.
- keepUploadsName: If set to true, then the original file name will be remained, otherwise a random string name will be used instead.
- uploadsDirectory: Determine the base uploads directory name that will contain all repositories uploads.
- pagination
- paginate: If set to true, then all list methods will be paginated by default.
- itemsPerPage: Defines default records per page when using the
paginateoption in any of the repository list methods, default is15.
info
Please note that all of these configurations can be overriden from the repository class itself or by passing values to the list methods calls
Repositories List#
All repositories are defined in the repositories key in the configurations file, it looks like:
The repositories key is an array, each key of it is the repository alias name, and its value is the repository class name.