dpsoft / nevise-mehr4
Nevise compatibility for Mehr LMS
This package's canonical repository appears to be gone and the package has been frozen as a result.
Requires
- php: ^7.1
- dpsoft/mehr: ^1.1
README
With this package you can migrate nevise to Mehr4.
Installation
You can install the package via composer:
composer require dpsoft/nevise-mehr4
The package will automatically register itself.
You can publish the migration with:
php artisan vendor:publish --provider="Dpsoft\NeviseMehr4\NeviseMehr4ServiceProvider" --tag="migrations"
You can optionally publish the config file with:
php artisan vendor:publish --provider="Dpsoft\NeviseMehr4\NeviseMehr4ServiceProvider" --tag="config"
This is the contents of the published config file:
return [
//nevise files path
'upload_path' => 'public/nevise',
// cache ttl for items like popular tags
'cache_time' => \Carbon\CarbonInterval::hours(12)->totalSeconds,
'post_tag' => [
//post popular tags variable name in balde
'popular_variable_name' => 'postPopularTags',
//post popular tags count
'popular_count' => 5,
],
'categories' => [
//categories variable name in balde
'variable_name' => 'postCategories',
//if 0 then get all categories
'count' => 0,
],
];
Usage
Facade
This package register many routes. To get this route you can use NeviseMehr4
facade:
Post url in nevise
NeviseMehr4::postUrl($post);
Tag posts url in nevise
NeviseMehr4::tagPostsUrl($tag);
Author posts url in nevise
NeviseMehr4::authorPostsUrl($user);
Category posts url in nevise
NeviseMehr4::categoryPostsUrl($category);
Get all posts in paginate. default paginate count is 10. You can change it by passing count to function.
NeviseMehr4::posts();
Shared View
this package also share 3 variable in views:
The postPopularTags
for popular Tags,featurePosts
for featured posts and postCategories
for special categories. These names could be configured in config file.
Testing
composer test
Security
If you discover any security related issues, please email sadeghpm@gmail.com instead of using the issue tracker.