Skip to content

ah-mabrouk/project_setting_package

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

69 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mabrouk/ProjectSetting

mabrouk/project-setting is a Laravel api package for dealing with project settings.

Table of Content

Usage sequence

Installation

Configurations according to project needs

Out of the box models

Out of the box routes

What else?

Any thing else?

License

Usage sequence

After installation and modifing configuration:

  • run command php artisan setting:install.
  • include predefined routes which control project setting types, groups, sections and settings display names in your api documentation to make it available for implementation from frontend developer side. or guide frontend developer to this documentation Models Api Resources to expect in requests response section

Installation

You can install the package using composer.

composer require mabrouk/project-setting
  • Now you need to run the following command in order to migrate package tables and publish project_settings.php config file to config directory
php artisan setting:install

Configurations according to project needs

Config file have several configuration options and already have enough comments to describe every key meaning and how to use.

You may access it under config/project_settings.php

After modifying project_settings.php config file don't forget to run below command:

php artisan config:cache

Out of the box models

We have 4 basic models to deal with:

  • ProjectSettingType
  • ProjectSettingGroup
  • ProjectSettingSection
  • ProjectSetting

Out of the box routes

Let's run the route:list command and discover our package predefined routes

php artisan route:list

What else?

// to be continue

Any thing else?

Actually one more thing to know is that this package depend on mabrouk/translatable package in order to handle translation dynamically for any chosen language.

You will need to pass additional input "locale" in update requests of mentioned models and need to create groups and sections with your application default language.

To get response with desired language you need to pass additional header to your requests "X-locale" with one of the available locales in your application

Both "locale" and "X-locale" accept values like ['en', 'ar', 'fr', ...] etc depending on languages you support in your project.

License

mabrouk/project-setting package is open-sourced software licensed under the MIT license.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages