From 1975841c02cc840e29b2153e9347177a4e593c63 Mon Sep 17 00:00:00 2001 From: Carsten Date: Wed, 10 Jun 2015 14:28:04 -0500 Subject: [PATCH] menus fully --- .../Validation/ValidationException.php | 42 +++ .../ConfigWriter/ConfigServiceProvider.php | 30 ++ .../Helpers/ConfigWriter/FileWriter.php | 113 ++++++ .../Helpers/ConfigWriter/Repository.php | 53 +++ .../General/Helpers/ConfigWriter/Rewrite.php | 164 +++++++++ app/{ => Modules/General}/Helpers/Helpers.php | 3 +- .../Controllers/menus/MenusController.php | 2 +- .../Domain/Menu/AbstractMenuDecorator.php | 56 +++ .../Http/Domain/Menu/AbstractValidator.php | 57 +++ .../Http/Domain/Menu/CacheDecorator.php | 118 ++++++ .../Http/Domain/Menu/CrudableInterface.php | 42 +++ .../Http/Domain/Menu/MenuInterface.php | 21 ++ .../Http/Domain/Menu/MenuRepository.php | 96 +++++ .../Http/Domain/Menu/RepositoryAbstract.php | 31 ++ .../Http/Domain/Menu/RepositoryInterface.php | 34 ++ .../Http/Domain/Typi/Facades/TypiFacade.php | 4 +- .../Http/Domain/Typi/Menus/EloquentMenu.php | 3 +- .../Domain/Typi/Menus/LinkerInterface.php | 3 +- .../Http/ViewComposers/MenuComposer.php | 42 +++ .../Providers/ComposerServiceProvider.php | 1 + .../Providers/GeneralServiceProvider.php | 16 +- .../Providers/RepositoryServiceProvider.php | 303 ++++++++++++++++ .../General/Services/Cache/CacheInterface.php | 40 ++ .../General/Services/Cache/FullyCache.php | 96 +++++ .../General/Services/Mailer/Mailer.php | 30 ++ .../Services/Mailer/MailerInterface.php | 13 + app/Modules/General/Services/Registrar.php | 39 ++ .../General/Services/Upload/FileUpload.php | 49 +++ .../Controllers/KagiPasswordController.php | 5 +- .../Kagi/Providers/KagiServiceProvider.php | 2 +- .../Providers/ProfilesServiceProvider.php | 8 +- bootstrap/autoload.php | 4 +- bootstrap/cache/.gitignore | 2 + composer.json | 6 +- composer.lock | 342 +++++------------- config/app.php | 17 +- resources/views/_partials/footer.blade.php | 3 +- 37 files changed, 1608 insertions(+), 282 deletions(-) create mode 100755 app/Exceptions/Validation/ValidationException.php create mode 100755 app/Modules/General/Helpers/ConfigWriter/ConfigServiceProvider.php create mode 100755 app/Modules/General/Helpers/ConfigWriter/FileWriter.php create mode 100755 app/Modules/General/Helpers/ConfigWriter/Repository.php create mode 100755 app/Modules/General/Helpers/ConfigWriter/Rewrite.php rename app/{ => Modules/General}/Helpers/Helpers.php (97%) create mode 100755 app/Modules/General/Http/Domain/Menu/AbstractMenuDecorator.php create mode 100755 app/Modules/General/Http/Domain/Menu/AbstractValidator.php create mode 100755 app/Modules/General/Http/Domain/Menu/CacheDecorator.php create mode 100755 app/Modules/General/Http/Domain/Menu/CrudableInterface.php create mode 100755 app/Modules/General/Http/Domain/Menu/MenuInterface.php create mode 100755 app/Modules/General/Http/Domain/Menu/MenuRepository.php create mode 100755 app/Modules/General/Http/Domain/Menu/RepositoryAbstract.php create mode 100755 app/Modules/General/Http/Domain/Menu/RepositoryInterface.php create mode 100755 app/Modules/General/Http/ViewComposers/MenuComposer.php create mode 100755 app/Modules/General/Providers/RepositoryServiceProvider.php create mode 100755 app/Modules/General/Services/Cache/CacheInterface.php create mode 100755 app/Modules/General/Services/Cache/FullyCache.php create mode 100755 app/Modules/General/Services/Mailer/Mailer.php create mode 100755 app/Modules/General/Services/Mailer/MailerInterface.php create mode 100755 app/Modules/General/Services/Registrar.php create mode 100755 app/Modules/General/Services/Upload/FileUpload.php create mode 100644 bootstrap/cache/.gitignore diff --git a/app/Exceptions/Validation/ValidationException.php b/app/Exceptions/Validation/ValidationException.php new file mode 100755 index 0000000..25a5b82 --- /dev/null +++ b/app/Exceptions/Validation/ValidationException.php @@ -0,0 +1,42 @@ +errors = $errors; + + parent::__construct($message, $code, $previous); + } + + /** + * Get error messages + * @return int + */ + public function getErrors() { + + return $this->errors; + } + + +} diff --git a/app/Modules/General/Helpers/ConfigWriter/ConfigServiceProvider.php b/app/Modules/General/Helpers/ConfigWriter/ConfigServiceProvider.php new file mode 100755 index 0000000..d0f6812 --- /dev/null +++ b/app/Modules/General/Helpers/ConfigWriter/ConfigServiceProvider.php @@ -0,0 +1,30 @@ +app->bind('app\Helpers\ConfigWriter\Repository', function($app) + { + $loader = $app->getConfigLoader(); + $writer = new FileWriter($loader, $app['path.config']); + return new Repository($loader, $writer, $app['env']); + }); + + $this->app['config'] = $this->app->share(function($app) + { + return $app->make('app\Helpers\ConfigWriter\Repository'); + }); + } + + +} diff --git a/app/Modules/General/Helpers/ConfigWriter/FileWriter.php b/app/Modules/General/Helpers/ConfigWriter/FileWriter.php new file mode 100755 index 0000000..950adef --- /dev/null +++ b/app/Modules/General/Helpers/ConfigWriter/FileWriter.php @@ -0,0 +1,113 @@ +loader = $loader; + $this->files = $loader->getFilesystem(); + $this->defaultPath = $defaultPath; + $this->rewriter = new Rewrite; + } + + public function write($item, $value, $environment, $group, $namespace = null) + { + $path = $this->getPath($environment, $group, $item, $namespace); + if (!$path) + return false; + + $contents = $this->files->get($path); + $contents = $this->rewriter->toContent($contents, [$item => $value]); + + return !($this->files->put($path, $contents) === false); + } + + private function getPath($environment, $group, $item, $namespace = null) + { + $hints = $this->loader->getNamespaces(); + + $path = null; + if (is_null($namespace)) { + $path = $this->defaultPath; + } + elseif (isset($this->hints[$namespace])) { + $path = $this->hints[$namespace]; + } + + if (is_null($path)) + return null; + + $file = "{$path}/{$environment}/{$group}.php"; + if ( $this->files->exists($file) && + $this->hasKey($file, $item) + ) + return $file; + + $file = "{$path}/{$group}.php"; + if ($this->files->exists($file)) + return $file; + + return null; + } + + private function hasKey($path, $key) + { + $contents = file_get_contents($path); + $vars = eval('?>'.$contents); + + $keys = explode('.', $key); + + $isset = false; + while ($key = array_shift($keys)) { + $isset = isset($vars[$key]); + } + + return $isset; + } + + +} diff --git a/app/Modules/General/Helpers/ConfigWriter/Repository.php b/app/Modules/General/Helpers/ConfigWriter/Repository.php new file mode 100755 index 0000000..99df836 --- /dev/null +++ b/app/Modules/General/Helpers/ConfigWriter/Repository.php @@ -0,0 +1,53 @@ +writer = $writer; + parent::__construct($loader, $environment); + } + + /** + * Write a given configuration value to file. + * + * @param string $key + * @param mixed $value + * @return void + */ + public function write($key, $value) + { + list($namespace, $group, $item) = $this->parseKey($key); + $result = $this->writer->write($item, $value, $this->environment, $group, $namespace); + + if(!$result) throw new \Exception('File could not be written to'); + + $this->set($key, $value); + } + + +} diff --git a/app/Modules/General/Helpers/ConfigWriter/Rewrite.php b/app/Modules/General/Helpers/ConfigWriter/Rewrite.php new file mode 100755 index 0000000..b5e705e --- /dev/null +++ b/app/Modules/General/Helpers/ConfigWriter/Rewrite.php @@ -0,0 +1,164 @@ +toContent($contents, $newValues, $useValidation); + file_put_contents($filePath, $contents); + return $contents; + } + + public function toContent($contents, $newValues, $useValidation = true) + { + $contents = $this->parseContent($contents, $newValues); + + if ($useValidation) { + $result = eval('?>'.$contents); + + foreach ($newValues as $key => $expectedValue) { + $parts = explode('.', $key); + + $array = $result; + foreach ($parts as $part) { + if (!is_array($array) || !array_key_exists($part, $array)) + throw new Exception(sprintf('Unable to rewrite key "%s" in config, does it exist?', $key)); + + $array = $array[$part]; + } + $actualValue = $array; + + if ($actualValue != $expectedValue) + throw new Exception(sprintf('Unable to rewrite key "%s" in config, rewrite failed', $key)); + } + } + + return $contents; + } + + private function parseContent($contents, $newValues) + { + $patterns = array(); + $replacements = array(); + + foreach ($newValues as $path => $value) { + $items = explode('.', $path); + $key = array_pop($items); + + if (is_string($value) && strpos($value, "'") === false) { + $replaceValue = "'".$value."'"; + } + elseif (is_string($value) && strpos($value, '"') === false) { + $replaceValue = '"'.$value.'"'; + } + elseif (is_bool($value)) { + $replaceValue = ($value ? 'true' : 'false'); + } + elseif (is_null($value)) { + $replaceValue = 'null'; + } + else { + $replaceValue = $value; + } + + $patterns[] = $this->buildStringExpression($key, $items); + $replacements[] = '${1}${2}'.$replaceValue; + + $patterns[] = $this->buildStringExpression($key, $items, '"'); + $replacements[] = '${1}${2}'.$replaceValue; + + $patterns[] = $this->buildConstantExpression($key, $items); + $replacements[] = '${1}${2}'.$replaceValue; + } + + return preg_replace($patterns, $replacements, $contents, 1); + } + + private function buildStringExpression($targetKey, $arrayItems = array(), $quoteChar = "'") + { + $expression = array(); + + // Opening expression for array items ($1) + $expression[] = $this->buildArrayOpeningExpression($arrayItems); + + // The target key opening + $expression[] = '([\'|"]'.$targetKey.'[\'|"]\s*=>\s*)['.$quoteChar.']'; + + // The target value to be replaced ($2) + $expression[] = '([^'.$quoteChar.']*)'; + + // The target key closure + $expression[] = '['.$quoteChar.']'; + + return '/' . implode('', $expression) . '/'; + } + + /** + * Common constants only (true, false, null, integers) + */ + private function buildConstantExpression($targetKey, $arrayItems = array()) + { + $expression = array(); + + // Opening expression for array items ($1) + $expression[] = $this->buildArrayOpeningExpression($arrayItems); + + // The target key opening ($2) + $expression[] = '([\'|"]'.$targetKey.'[\'|"]\s*=>\s*)'; + + // The target value to be replaced ($3) + $expression[] = '([tT][rR][uU][eE]|[fF][aA][lL][sS][eE]|[nN][uU][lL]{2}|[\d]+)'; + + return '/' . implode('', $expression) . '/'; + } + + private function buildArrayOpeningExpression($arrayItems) + { + if (count($arrayItems)) { + $itemOpen = array(); + foreach ($arrayItems as $item) { + // The left hand array assignment + $itemOpen[] = '[\'|"]'.$item.'[\'|"]\s*=>\s*(?:[aA][rR]{2}[aA][yY]\(|[\[])'; + } + + // Capture all opening array (non greedy) + $result = '(' . implode('[\s\S]*', $itemOpen) . '[\s\S]*?)'; + } + else { + // Gotta capture something for $1 + $result = '()'; + } + + return $result; + } + + +} diff --git a/app/Helpers/Helpers.php b/app/Modules/General/Helpers/Helpers.php similarity index 97% rename from app/Helpers/Helpers.php rename to app/Modules/General/Helpers/Helpers.php index f567baa..8fd19dc 100755 --- a/app/Helpers/Helpers.php +++ b/app/Modules/General/Helpers/Helpers.php @@ -1,4 +1,5 @@ menu = $menu; + } + + /** + * @return mixed + */ + public function all() { + + return $this->menu->all(); + } + + /** + * @param $menu + * @param int $parentId + * @param bool $starter + * @return mixed + */ + public function generateFrontMenu($menu, $parentId = 0, $starter = false) { + + return $this->menu->generateFrontMenu($menu, $parentId, $starter); + } + + /** + * @param $id + * @return bool + */ + public function hasChildItems($id) { + + $this->menu->hasChildItems($id); + } + + +} diff --git a/app/Modules/General/Http/Domain/Menu/AbstractValidator.php b/app/Modules/General/Http/Domain/Menu/AbstractValidator.php new file mode 100755 index 0000000..122df63 --- /dev/null +++ b/app/Modules/General/Http/Domain/Menu/AbstractValidator.php @@ -0,0 +1,57 @@ +fails()) { + + $this->setErrors($v->messages()); + return false; + } + + return true; + } + + /** + * Get validation error messages + * @return mixed + */ + public function getErrors() { + + return $this->errors; + } + + /** + * Set validation error messages + * @param $error + */ + public function setErrors($error) { + + $this->errors = $error; + } + + +} diff --git a/app/Modules/General/Http/Domain/Menu/CacheDecorator.php b/app/Modules/General/Http/Domain/Menu/CacheDecorator.php new file mode 100755 index 0000000..1a2d266 --- /dev/null +++ b/app/Modules/General/Http/Domain/Menu/CacheDecorator.php @@ -0,0 +1,118 @@ +cache = $cache; + } + + /** + * @return mixed + */ + public function all() { + + $key = md5(getLang() . $this->cacheKey. 'all.menus'); + + if ($this->cache->has($key)) { + return $this->cache->get($key); + } + + $menus = $this->menu->all(); + + $this->cache->put($key, $menus); + + return $menus; + } + + /** + * @param $menu + * @param int $parentId + * @param bool $starter + * @return mixed|null|string + */ + public function generateFrontMenu($menu, $parentId = 0, $starter = false) { + + $key = md5(getLang() . $this->cacheKey . $parentId . '.menu.html'); + + if ($this->cache->has($key)) { + return $this->cache->get($key); + } + + $result = null; + + foreach ($menu as $item) { + + if ($item->parent_id == $parentId) { + + $childItem = $this->hasChildItems($item->id); + + $result .= ""; + } + } + + $returnData = $result ? "\n\n" : null; + + $this->cache->put($key, $returnData); + + return $returnData; + } + + /** + * @param $items + * @return mixed|null|string + */ + public function getFrontMenuHTML($items) { + + $menus = $this->generateFrontMenu($items, 0, true); + + return $menus; + } + + /** + * @param $id + * @return bool|mixed + */ + public function hasChildItems($id) { + + $key = md5(getLang() . $this->cacheKey . $id . '.has.child'); + + if ($this->cache->has($key)) { + return $this->cache->get($key); + } + + $result = $this->menu->hasChildItems($id); + $this->cache->put($key, $result); + return $result; + } + + +} diff --git a/app/Modules/General/Http/Domain/Menu/CrudableInterface.php b/app/Modules/General/Http/Domain/Menu/CrudableInterface.php new file mode 100755 index 0000000..438c15b --- /dev/null +++ b/app/Modules/General/Http/Domain/Menu/CrudableInterface.php @@ -0,0 +1,42 @@ +menu = $menu; + } + + /** + * @return mixed + */ + public function all() { + + return $this->menu->where('is_published', 1)->where('lang', $this->getLang())->orderBy('order', 'asc')->get(); + } + + /** + * @param $menu + * @param int $parentId + * @param bool $starter + * @return null|string + */ + public function generateFrontMenu($menu, $parentId = 0, $starter = false) { + + $result = null; + + foreach ($menu as $item) { + + if ($item->parent_id == $parentId) { + + $childItem = $this->hasChildItems($item->id); + + $result .= ""; + } + } + + return $result ? "\n\n" : null; + } + + /** + * @param $items + * @return null|string + */ + public function getFrontMenuHTML($items) { + + return $this->generateFrontMenu($items, 0, true); + } + + /** + * @param $id + * @return bool + */ + public function hasChildItems($id) { + + $count = $this->menu->where('parent_id', $id)->where('is_published', 1)->where('lang', $this->getLang())->get()->count(); + if ($count === 0) return false; + return true; + } + + +} diff --git a/app/Modules/General/Http/Domain/Menu/RepositoryAbstract.php b/app/Modules/General/Http/Domain/Menu/RepositoryAbstract.php new file mode 100755 index 0000000..cc7eff6 --- /dev/null +++ b/app/Modules/General/Http/Domain/Menu/RepositoryAbstract.php @@ -0,0 +1,31 @@ +menu=$menu; + } + + /** + * @param $view + */ + public function compose($view) { + + $items = $this->menu->all(); + $menus = $this->menu->getFrontMenuHTML($items); + $view->with('menus', $menus); + } + + +} diff --git a/app/Modules/General/Providers/ComposerServiceProvider.php b/app/Modules/General/Providers/ComposerServiceProvider.php index 4ef7cc1..7f8024b 100755 --- a/app/Modules/General/Providers/ComposerServiceProvider.php +++ b/app/Modules/General/Providers/ComposerServiceProvider.php @@ -22,6 +22,7 @@ public function boot() // Using class based composers... // View::composer('_partials.menu_links', 'App\Modules\General\Http\ViewComposers\HeaderComposer'); // View::composer('_partials.footer', 'App\Modules\General\Http\ViewComposers\FooterComposer'); + View::composer('_partials.footer', 'App\Modules\General\Http\ViewComposers\MenuComposer'); // Using Closure based composers... // View::composer('dashboard', function($view) diff --git a/app/Modules/General/Providers/GeneralServiceProvider.php b/app/Modules/General/Providers/GeneralServiceProvider.php index a6dca7d..36dfddd 100644 --- a/app/Modules/General/Providers/GeneralServiceProvider.php +++ b/app/Modules/General/Providers/GeneralServiceProvider.php @@ -22,19 +22,29 @@ class GeneralServiceProvider extends ServiceProvider public function register() { App::register('App\Modules\General\Providers\RouteServiceProvider'); - App::register('App\Modules\General\Providers\GeneralMenuProvider'); +// App::register('App\Modules\General\Providers\GeneralMenuProvider'); App::register('App\Modules\General\Providers\ComposerServiceProvider'); + App::register('App\Modules\General\Providers\RepositoryServiceProvider'); +// App::register('App\Modules\General\Helpers\Helpers.php'); $this->registerNamespaces(); // $this->registerMenus(); -//App::bind('App\Modules\General\Http\Domain\Typi\Facades\TypiFacade', 'Menus'); +// App::bind('App\Modules\General\Http\Domain\Typi\Facades\TypiFacade', 'Linker'); +// App::bind('App\Modules\General\Http\Domain\Typi\Menus\LinkerInterface', 'Linker'); // $app = $this->app; // $app->bind('App\Modules\General\Http\Domain\Typi\Menus\MenuInterface', function (Application $app) {}); +// AliasLoader::getInstance()->alias( +// 'Menus', +// 'TypiCMS\Modules\Menus\Facades\Facade' +// ); // AliasLoader::getInstance()->alias( // 'Linker', -// 'App\Modules\General\Http\Domain\Typi\Facades\TypiFacade' +// // 'App\Modules\General\Http\Domain\Typi\Facades\TypiFacade' +// 'App\Modules\General\Http\Domain\Typi\Menus\LinkerInterface' // ); +//'Linker' => 'App\Modules\General\Http\Domain\Typi\Menus\LinkerInterface', +//'Linker' => 'App\Modules\General\Http\Domain\Typi\Facades\TypiFacade', // $this->app->bind( // 'App\Modules\General\Http\Domain\Typi\Facades\TypiFacade' // ); diff --git a/app/Modules/General/Providers/RepositoryServiceProvider.php b/app/Modules/General/Providers/RepositoryServiceProvider.php new file mode 100755 index 0000000..6195785 --- /dev/null +++ b/app/Modules/General/Providers/RepositoryServiceProvider.php @@ -0,0 +1,303 @@ +app; + + //dd($app['config']->get('fully.cache')); + + // menu + $app->bind('App\Modules\General\Http\Domain\Menu\MenuInterface', function ($app) { + + $menu = new MenuRepository( + new Menu + ); + + if ($app['config']->get('fully.cache') === true && $app['config']->get('is_admin', false) == false) { + + $menu = new MenuCacheDecorator( + $menu, + new FullyCache($app['cache'], 'menus') + ); + } + + return $menu; + }); +/* + // article + $app->bind('Fully\Repositories\Article\ArticleInterface', function ($app) { + + $article = new ArticleRepository( + new Article + ); + + if ($app['config']->get('fully.cache') === true && $app['config']->get('is_admin', false) == false) { + + $article = new ArticleCacheDecorator( + $article, + new FullyCache($app['cache'], 'articles') + ); + } + + return $article; + }); + + // category + $app->bind('Fully\Repositories\Category\CategoryInterface', function ($app) { + + $category = new CategoryRepository( + new Category + ); + + + if ($app['config']->get('fully.cache') === true && $app['config']->get('is_admin', false) == false) { + + $category = new CategoryCacheDecorator( + $category, + new FullyCache($app['cache'], 'categories') + ); + } + + return $category; + }); + + + // page + $app->bind('Fully\Repositories\Page\PageInterface', function ($app) { + + $page = new PageRepository( + new Page + ); + + if ($app['config']->get('fully.cache') === true && $app['config']->get('is_admin', false) == false) { + + $page = new PageCacheDecorator( + $page, + new FullyCache($app['cache'], 'pages') + ); + } + + return $page; + }); + + + // faq + $app->bind('Fully\Repositories\Faq\FaqInterface', function ($app) { + + $faq = new FaqRepository( + new Faq + ); + + if ($app['config']->get('fully.cache') === true && $app['config']->get('is_admin', false) == false) { + + $faq = new FaqCacheDecorator( + $faq, + new FullyCache($app['cache'], 'faqs') + ); + } + + return $faq; + }); + + + // news + $app->bind('Fully\Repositories\News\NewsInterface', function ($app) { + + $news = new NewsRepository( + new News + ); + + if ($app['config']->get('fully.cache') === true && $app['config']->get('is_admin', false) == false) { + + $news = new NewsCacheDecorator( + $news, + new FullyCache($app['cache'], 'pages') + ); + } + + return $news; + }); + + // photo gallery + $app->bind('Fully\Repositories\PhotoGallery\PhotoGalleryInterface', function ($app) { + + $photoGallery = new PhotoGalleryRepository( + new PhotoGallery + ); + + if ($app['config']->get('fully.cache') === true && $app['config']->get('is_admin', false) == false) { + + $photoGallery = new PhotoGalleryCacheDecorator( + $photoGallery, + new FullyCache($app['cache'], 'photo_galleries') + ); + } + + return $photoGallery; + }); + + + // project + $app->bind('Fully\Repositories\Project\ProjectInterface', function ($app) { + + $project = new ProjectRepository( + new Project + ); + + if ($app['config']->get('fully.cache') === true && $app['config']->get('is_admin', false) == false) { + + $project = new ProjectCacheDecorator( + $project, + new FullyCache($app['cache'], 'projects') + ); + } + + return $project; + }); + + // tag + $app->bind('Fully\Repositories\Tag\TagInterface', function ($app) { + + $tag = new TagRepository( + new Tag + ); + + if ($app['config']->get('fully.cache') === true && $app['config']->get('is_admin', false) == false) { + + $tag = new TagCacheDecorator( + $tag, + new FullyCache($app['cache'], 'tags') + ); + } + + return $tag; + }); + + // video + $app->bind('Fully\Repositories\Video\VideoInterface', function ($app) { + + $video = new VideoRepository( + new Video + ); + + if ($app['config']->get('fully.cache') === true && $app['config']->get('is_admin', false) == false) { + + $video = new VideoCacheDecorator( + $video, + new FullyCache($app['cache'], 'pages') + ); + } + + return $video; + }); + + // slider + $app->bind('Fully\Repositories\Slider\SliderInterface', function ($app) { + + $slider = new SliderRepository( + new Slider + ); + + if ($app['config']->get('fully.cache') === true && $app['config']->get('is_admin', false) == false) { + + $slider = new SliderCacheDecorator( + $slider, + new FullyCache($app['cache'], 'sliders') + ); + } + + return $slider; + }); + + // setting + $app->bind('Fully\Repositories\Setting\SettingInterface', function ($app) { + + $setting = new SettingRepository( + new Setting + ); + + if ($app['config']->get('fully.cache') === true && $app['config']->get('is_admin', false) == false) { + + $setting = new SettingCacheDecorator( + $setting, + new FullyCache($app['cache'], 'settings') + ); + } + + return $setting; + }); +*/ + } + + +} diff --git a/app/Modules/General/Services/Cache/CacheInterface.php b/app/Modules/General/Services/Cache/CacheInterface.php new file mode 100755 index 0000000..ba1f98c --- /dev/null +++ b/app/Modules/General/Services/Cache/CacheInterface.php @@ -0,0 +1,40 @@ +cache = $cache; + $this->tag = $tag; + $this->minutes = $minutes; + + $this->cacheDriver = Config::get('cache.driver'); + } + + /** + * Get + * @param $key + * @return mixed + */ + public function get($key) { + + if ($this->cacheDriver == "file") + return $this->cache->get($key); + + return $this->cache->tags($this->tag)->get($key); + } + + /** + * Put + * @param $key + * @param $value + * @param null $minutes + * @return mixed + */ + public function put($key, $value, $minutes = null) { + + if (is_null($minutes)) { + $minutes = $this->minutes; + } + + if ($this->cacheDriver == "file") + return $this->cache->put($key, $value, $minutes); + + return $this->cache->tags($this->tag)->put($key, $value, $minutes); + } + + /** + * Has + * @param $key + * @return bool + */ + public function has($key) { + + if ($this->cacheDriver == "file") + return $this->cache->has($key); + + return $this->cache->tags($this->tag)->has($key); + } + + +} diff --git a/app/Modules/General/Services/Mailer/Mailer.php b/app/Modules/General/Services/Mailer/Mailer.php new file mode 100755 index 0000000..41eae22 --- /dev/null +++ b/app/Modules/General/Services/Mailer/Mailer.php @@ -0,0 +1,30 @@ +from('noreply@fullycms.com'); + $message->to($email)->subject($subject); + }); + } + + public function queue($view, $email, $subject, $data = array()) { + + Mail::queue($view, $data, function ($message) use ($email, $subject) { + + $message->from('noreply@fullycms.com'); + $message->to($email)->subject($subject); + }); + } +} diff --git a/app/Modules/General/Services/Mailer/MailerInterface.php b/app/Modules/General/Services/Mailer/MailerInterface.php new file mode 100755 index 0000000..74e8eff --- /dev/null +++ b/app/Modules/General/Services/Mailer/MailerInterface.php @@ -0,0 +1,13 @@ + 'required|max:255', + 'email' => 'required|email|max:255|unique:users', + 'password' => 'required|confirmed|min:6', + ]); + } + + /** + * Create a new user instance after a valid registration. + * + * @param array $data + * @return User + */ + public function create(array $data) + { + return User::create([ + 'name' => $data['name'], + 'email' => $data['email'], + 'password' => bcrypt($data['password']), + ]); + } + +} diff --git a/app/Modules/General/Services/Upload/FileUpload.php b/app/Modules/General/Services/Upload/FileUpload.php new file mode 100755 index 0000000..d01bc97 --- /dev/null +++ b/app/Modules/General/Services/Upload/FileUpload.php @@ -0,0 +1,49 @@ +getClientOriginalName(), PATHINFO_FILENAME)); + // Detect and transform Croppa pattern to avoid problem with Croppa::delete() + $fileName = preg_replace('#([0-9_]+)x([0-9_]+)#', "$1-$2", $fileName); + $input['path'] = $path; + $input['extension'] = '.' . $file->getClientOriginalExtension(); + $input['filesize'] = $file->getClientSize(); + $input['mimetype'] = $file->getClientMimeType(); + $input['filename'] = $fileName . $input['extension']; + $fileTypes = Config::get('file.types'); + $input['type'] = $fileTypes[strtolower($file->getClientOriginalExtension())]; + $filecounter = 1; + while (file_exists($input['path'] . '/' . $input['filename'])) { + $input['filename'] = $fileName . '_' . $filecounter++ . $input['extension']; + } + try { + $file->move($input['path'], $input['filename']); + list($input['width'], $input['height']) = getimagesize($input['path'] . '/' . $input['filename']); + return $input; + } catch (FileException $e) { + Notification::error($e->getmessage()); + return false; + } + } +} \ No newline at end of file diff --git a/app/Modules/Kagi/Http/Controllers/KagiPasswordController.php b/app/Modules/Kagi/Http/Controllers/KagiPasswordController.php index 83d0f2c..1f7426c 100644 --- a/app/Modules/Kagi/Http/Controllers/KagiPasswordController.php +++ b/app/Modules/Kagi/Http/Controllers/KagiPasswordController.php @@ -28,7 +28,10 @@ class KagiPasswordController extends Controller { * @param \Illuminate\Contracts\Auth\PasswordBroker $passwords * @return void */ - public function __construct(Guard $auth, PasswordBroker $passwords) + public function __construct( +// Guard $auth, +// PasswordBroker $passwords + ) { $this->auth = $auth; $this->passwords = $passwords; diff --git a/app/Modules/Kagi/Providers/KagiServiceProvider.php b/app/Modules/Kagi/Providers/KagiServiceProvider.php index ad4f61f..bc268fe 100644 --- a/app/Modules/Kagi/Providers/KagiServiceProvider.php +++ b/app/Modules/Kagi/Providers/KagiServiceProvider.php @@ -18,7 +18,7 @@ public function register() { App::register('App\Modules\Kagi\Providers\RouteServiceProvider'); - App::register('App\Modules\Kagi\Providers\KagiMenuProvider'); +// App::register('App\Modules\Kagi\Providers\KagiMenuProvider'); $this->mergeConfigFrom( __DIR__.'/../Config/kagi.php', 'kagi' diff --git a/app/Modules/Profiles/Providers/ProfilesServiceProvider.php b/app/Modules/Profiles/Providers/ProfilesServiceProvider.php index 69f6ea1..bba8cc2 100644 --- a/app/Modules/Profiles/Providers/ProfilesServiceProvider.php +++ b/app/Modules/Profiles/Providers/ProfilesServiceProvider.php @@ -23,7 +23,7 @@ public function register() // methods or service providers to keep the code more focused and granular. App::register('App\Modules\Profiles\Providers\RouteServiceProvider'); App::register('App\Modules\Profiles\Providers\ProfileEventServiceProvider'); - App::register('App\Modules\Profiles\Providers\ProfileMenuProvider'); +// App::register('App\Modules\Profiles\Providers\ProfileMenuProvider'); $this->registerNamespaces(); } @@ -50,9 +50,9 @@ public function boot() __DIR__.'/../Config/profiles.php' => config_path('profiles.php'), ]); - Menu::make('public', function($menu) { - $menu->add('Profiles', 'profiles'); - }); +// Menu::make('public', function($menu) { +// $menu->add('Profiles', 'profiles'); +// }); } diff --git a/bootstrap/autoload.php b/bootstrap/autoload.php index 39bf54c..80dbb3a 100644 --- a/bootstrap/autoload.php +++ b/bootstrap/autoload.php @@ -27,8 +27,8 @@ | */ -//$compiledPath = __DIR__.'/../storage/framework/compiled.php'; -$compiledPath = __DIR__.'/../vendor/compiled.php'; + $compiledPath = __DIR__.'/../vendor/compiled.php'; +//$compiledPath = __DIR__.'/cache/compiled.php'; if (file_exists($compiledPath)) { diff --git a/bootstrap/cache/.gitignore b/bootstrap/cache/.gitignore new file mode 100644 index 0000000..d6b7ef3 --- /dev/null +++ b/bootstrap/cache/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore diff --git a/composer.json b/composer.json index e1bea20..aa191ff 100644 --- a/composer.json +++ b/composer.json @@ -7,11 +7,10 @@ "require": { "laravel/framework": "5.0.*", "illuminate3/kotoba": "dev-master", - "caffeinated/modules": "dev-master", + "caffeinated/modules": "~1.0", "caffeinated/themes": "~1.2", "caffeinated/flash": "dev-master", "caffeinated/shinobi": "dev-master", - "caffeinated/menus": "~1.0", "caffeinated/plugins": "dev-master", "laravel/socialite": "~2.0", "laravelcollective/html": "~5.0", @@ -22,8 +21,7 @@ "intervention/imagecache": "~2.1", "wikimedia/composer-merge-plugin": "~1.0", "kalnoy/nestedset": "dev-master", - "typicms/nestablecollection": "1.*", - "vespakoen/menu": "3.*", + "dimsav/laravel-translatable": "5.0.*", "arrilot/laravel-widgets": "~2.2" }, "require-dev": { diff --git a/composer.lock b/composer.lock index d16a785..de30199 100644 --- a/composer.lock +++ b/composer.lock @@ -4,81 +4,8 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "2e552c4e650ec10a516544caeea0da08", + "hash": "68adb0214a95ef1c80349d6f55fce3cc", "packages": [ - { - "name": "anahkiasen/html-object", - "version": "1.2.0", - "source": { - "type": "git", - "url": "https://github.com/Anahkiasen/html-object.git", - "reference": "71eb5bd920e845aaea0d7face6e73aa9a63d6bde" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Anahkiasen/html-object/zipball/71eb5bd920e845aaea0d7face6e73aa9a63d6bde", - "reference": "71eb5bd920e845aaea0d7face6e73aa9a63d6bde", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "type": "library", - "autoload": { - "psr-0": { - "HtmlObject": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Maxime Fabre", - "email": "ehtnam6@gmail.com" - } - ], - "description": "A set of classes to create and manipulate HTML objects abstractions", - "time": "2014-01-14 11:42:36" - }, - { - "name": "anahkiasen/underscore-php", - "version": "1.0.0", - "source": { - "type": "git", - "url": "https://github.com/Anahkiasen/underscore-php.git", - "reference": "362e5b1b6d0b4ccdddeed2e9e95f6766ec4f4f2e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Anahkiasen/underscore-php/zipball/362e5b1b6d0b4ccdddeed2e9e95f6766ec4f4f2e", - "reference": "362e5b1b6d0b4ccdddeed2e9e95f6766ec4f4f2e", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "type": "library", - "autoload": { - "psr-0": { - "Underscore": "src/", - "Laravel": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Maxime Fabre", - "email": "ehtnam6@gmail.com" - } - ], - "description": "A redacted port of Underscore.js for PHP", - "time": "2013-01-17 23:07:04" - }, { "name": "arrilot/laravel-widgets", "version": "2.6", @@ -175,56 +102,9 @@ ], "time": "2015-02-04 23:29:37" }, - { - "name": "caffeinated/menus", - "version": "v1.0.6", - "source": { - "type": "git", - "url": "https://github.com/caffeinated/menus.git", - "reference": "ee7fed8f97d146b9cb24324541e90a0487a3ab3b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/caffeinated/menus/zipball/ee7fed8f97d146b9cb24324541e90a0487a3ab3b", - "reference": "ee7fed8f97d146b9cb24324541e90a0487a3ab3b", - "shasum": "" - }, - "require": { - "illuminate/config": "~5.0", - "illuminate/routing": "~5.0", - "illuminate/support": "~5.0", - "illuminate/view": "~5.0", - "laravelcollective/html": "~5.0", - "php": ">=5.4.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Caffeinated\\Menus\\": "src/Caffeinated/Menus/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Shea Lewis", - "email": "shea.lewis89@gmail.com" - } - ], - "description": "Laravel 5 Menus", - "keywords": [ - "caffeinated", - "laravel", - "menu", - "navigation" - ], - "time": "2015-05-11 23:04:20" - }, { "name": "caffeinated/modules", - "version": "dev-master", + "version": "v1.2.2", "source": { "type": "git", "url": "https://github.com/caffeinated/modules.git", @@ -544,6 +424,57 @@ ], "time": "2015-02-10 06:19:18" }, + { + "name": "dimsav/laravel-translatable", + "version": "v5.0.1", + "source": { + "type": "git", + "url": "https://github.com/dimsav/laravel-translatable.git", + "reference": "9064c591a72747c3aec8886b4ce10b0d6eb75029" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/dimsav/laravel-translatable/zipball/9064c591a72747c3aec8886b4ce10b0d6eb75029", + "reference": "9064c591a72747c3aec8886b4ce10b0d6eb75029", + "shasum": "" + }, + "require": { + "illuminate/support": "~5.0", + "php": ">=5.4.0" + }, + "require-dev": { + "orchestra/testbench": "~3.0", + "phpunit/phpunit": "~4.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Dimsav\\Translatable\\": "src/Translatable/" + }, + "classmap": [ + "tests" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Dimitrios Savvopoulos", + "email": "ds@dimsav.com", + "homepage": "http://dimsav.com" + } + ], + "description": "A Laravel package for multilingual models", + "keywords": [ + "database", + "language", + "laravel", + "translation" + ], + "time": "2015-03-06 14:26:56" + }, { "name": "dnoegel/php-xdg-base-dir", "version": "0.1", @@ -1402,16 +1333,16 @@ }, { "name": "laravel/framework", - "version": "v5.0.32", + "version": "v5.0.33", "source": { "type": "git", "url": "https://github.com/laravel/framework.git", - "reference": "85f12207cf45cc288e9e6b9b5d184aad5f08e2ca" + "reference": "b11c8ab88245f920b30e5f30e16b141ac8d461d3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/85f12207cf45cc288e9e6b9b5d184aad5f08e2ca", - "reference": "85f12207cf45cc288e9e6b9b5d184aad5f08e2ca", + "url": "https://api.github.com/repos/laravel/framework/zipball/b11c8ab88245f920b30e5f30e16b141ac8d461d3", + "reference": "b11c8ab88245f920b30e5f30e16b141ac8d461d3", "shasum": "" }, "require": { @@ -1524,7 +1455,7 @@ "framework", "laravel" ], - "time": "2015-05-29 18:56:49" + "time": "2015-06-09 13:12:19" }, { "name": "laravel/socialite", @@ -1632,19 +1563,20 @@ }, { "name": "league/flysystem", - "version": "1.0.3", + "version": "1.0.4", "source": { "type": "git", "url": "https://github.com/thephpleague/flysystem.git", - "reference": "3c2400a99ccc3be6884d40361890010449c6b447" + "reference": "56862959b45131ad33e5a7727a25db19f2cf090b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/3c2400a99ccc3be6884d40361890010449c6b447", - "reference": "3c2400a99ccc3be6884d40361890010449c6b447", + "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/56862959b45131ad33e5a7727a25db19f2cf090b", + "reference": "56862959b45131ad33e5a7727a25db19f2cf090b", "shasum": "" }, "require": { + "ext-mbstring": "*", "php": ">=5.4.0" }, "require-dev": { @@ -1711,7 +1643,7 @@ "sftp", "storage" ], - "time": "2015-03-29 14:01:43" + "time": "2015-06-07 21:27:37" }, { "name": "league/oauth1-client", @@ -2145,23 +2077,23 @@ }, { "name": "swiftmailer/swiftmailer", - "version": "v5.4.0", + "version": "v5.4.1", "source": { "type": "git", "url": "https://github.com/swiftmailer/swiftmailer.git", - "reference": "31454f258f10329ae7c48763eb898a75c39e0a9f" + "reference": "0697e6aa65c83edf97bb0f23d8763f94e3f11421" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/31454f258f10329ae7c48763eb898a75c39e0a9f", - "reference": "31454f258f10329ae7c48763eb898a75c39e0a9f", + "url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/0697e6aa65c83edf97bb0f23d8763f94e3f11421", + "reference": "0697e6aa65c83edf97bb0f23d8763f94e3f11421", "shasum": "" }, "require": { "php": ">=5.3.3" }, "require-dev": { - "mockery/mockery": "~0.9.1" + "mockery/mockery": "~0.9.1,<0.9.4" }, "type": "library", "extra": { @@ -2190,10 +2122,11 @@ "description": "Swiftmailer, free feature-rich PHP mailer", "homepage": "http://swiftmailer.org", "keywords": [ + "email", "mail", "mailer" ], - "time": "2015-03-14 06:06:39" + "time": "2015-06-06 14:19:39" }, { "name": "symfony/console", @@ -2905,102 +2838,6 @@ ], "time": "2015-05-01 14:14:24" }, - { - "name": "typicms/nestablecollection", - "version": "v1.1.1", - "source": { - "type": "git", - "url": "https://github.com/TypiCMS/NestableCollection.git", - "reference": "e75ed5efaf7cf8d98a44fd31e0435352a3bae0ff" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/TypiCMS/NestableCollection/zipball/e75ed5efaf7cf8d98a44fd31e0435352a3bae0ff", - "reference": "e75ed5efaf7cf8d98a44fd31e0435352a3bae0ff", - "shasum": "" - }, - "require": { - "illuminate/database": "~4.2.0|~5.0", - "illuminate/support": "~4.2.0|~5.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "TypiCMS\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Samuel De Backer", - "email": "sdebacker@gmail.com" - } - ], - "description": "A Laravel Package that extends Collection to handle unlimited nested items following adjacency list model.", - "keywords": [ - "TypiCMS", - "adjacency list", - "collection", - "eloquent", - "laravel", - "nested set", - "tree" - ], - "time": "2015-05-13 20:26:35" - }, - { - "name": "vespakoen/menu", - "version": "3.0", - "source": { - "type": "git", - "url": "https://github.com/vespakoen/menu.git", - "reference": "2052cf7a22f767507219dccb86edde51ddead4e2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/vespakoen/menu/zipball/2052cf7a22f767507219dccb86edde51ddead4e2", - "reference": "2052cf7a22f767507219dccb86edde51ddead4e2", - "shasum": "" - }, - "require": { - "anahkiasen/html-object": "~1.2.0", - "anahkiasen/underscore-php": "~1", - "illuminate/config": "5.*", - "illuminate/container": "5.*", - "illuminate/http": "5.*", - "php": ">=5.4.0" - }, - "require-dev": { - "orchestra/testbench": "3.0.*", - "phpunit/phpunit": "4.0" - }, - "type": "library", - "autoload": { - "psr-0": { - "Menu": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Koen Schmeets", - "email": "hello@koenschmeets.nl" - } - ], - "description": "Managing menus the easy way.", - "keywords": [ - "laravel", - "laravel 5", - "menu" - ], - "time": "2015-02-08 11:57:54" - }, { "name": "vlucas/phpdotenv", "version": "v1.1.1", @@ -3145,20 +2982,20 @@ "packages-dev": [ { "name": "barryvdh/laravel-debugbar", - "version": "v2.0.3", + "version": "v2.0.4", "source": { "type": "git", "url": "https://github.com/barryvdh/laravel-debugbar.git", - "reference": "77be5170f3777e2e899ec98105ce5686cd4aa63b" + "reference": "3edaea0e8056edde00f7d0af13ed0d406412182d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/barryvdh/laravel-debugbar/zipball/77be5170f3777e2e899ec98105ce5686cd4aa63b", - "reference": "77be5170f3777e2e899ec98105ce5686cd4aa63b", + "url": "https://api.github.com/repos/barryvdh/laravel-debugbar/zipball/3edaea0e8056edde00f7d0af13ed0d406412182d", + "reference": "3edaea0e8056edde00f7d0af13ed0d406412182d", "shasum": "" }, "require": { - "illuminate/support": "5.0.x", + "illuminate/support": "~5.0.17|5.1.*", "maximebf/debugbar": "~1.10.2", "php": ">=5.4.0", "symfony/finder": "~2.6" @@ -3195,7 +3032,7 @@ "profiler", "webprofiler" ], - "time": "2015-03-07 15:15:23" + "time": "2015-06-07 07:19:29" }, { "name": "doctrine/instantiator", @@ -3632,16 +3469,16 @@ }, { "name": "phpunit/php-code-coverage", - "version": "2.1.3", + "version": "2.1.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "28a6b34e91d789b2608072ab3c82eaae7cdb973c" + "reference": "be2286cb8c7e1773eded49d9719219e6f74f9e3e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/28a6b34e91d789b2608072ab3c82eaae7cdb973c", - "reference": "28a6b34e91d789b2608072ab3c82eaae7cdb973c", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/be2286cb8c7e1773eded49d9719219e6f74f9e3e", + "reference": "be2286cb8c7e1773eded49d9719219e6f74f9e3e", "shasum": "" }, "require": { @@ -3690,7 +3527,7 @@ "testing", "xunit" ], - "time": "2015-06-03 07:01:01" + "time": "2015-06-09 13:05:42" }, { "name": "phpunit/php-file-iterator", @@ -3878,16 +3715,16 @@ }, { "name": "phpunit/phpunit", - "version": "4.6.10", + "version": "4.7.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "7b5fe98b28302a8b25693b2298bca74463336975" + "reference": "8e0c63329c8c4185296b8d357daa5c6bae43080f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/7b5fe98b28302a8b25693b2298bca74463336975", - "reference": "7b5fe98b28302a8b25693b2298bca74463336975", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/8e0c63329c8c4185296b8d357daa5c6bae43080f", + "reference": "8e0c63329c8c4185296b8d357daa5c6bae43080f", "shasum": "" }, "require": { @@ -3898,7 +3735,7 @@ "ext-spl": "*", "php": ">=5.3.3", "phpspec/prophecy": "~1.3,>=1.3.1", - "phpunit/php-code-coverage": "~2.0,>=2.0.11", + "phpunit/php-code-coverage": "~2.1", "phpunit/php-file-iterator": "~1.4", "phpunit/php-text-template": "~1.2", "phpunit/php-timer": "~1.0", @@ -3920,7 +3757,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.6.x-dev" + "dev-master": "4.7.x-dev" } }, "autoload": { @@ -3946,7 +3783,7 @@ "testing", "xunit" ], - "time": "2015-06-03 05:03:30" + "time": "2015-06-06 08:36:08" }, { "name": "phpunit/phpunit-mock-objects", @@ -4428,7 +4265,6 @@ "minimum-stability": "stable", "stability-flags": { "illuminate3/kotoba": 20, - "caffeinated/modules": 20, "caffeinated/flash": 20, "caffeinated/shinobi": 20, "caffeinated/plugins": 20, diff --git a/config/app.php b/config/app.php index 2bc3a4e..046b5b0 100644 --- a/config/app.php +++ b/config/app.php @@ -147,7 +147,7 @@ /* * Extend Application Service Providers... */ -'App\Providers\MenuServiceProvider', +//'App\Providers\MenuServiceProvider', 'App\Providers\ViewComposerServiceProvider', //'App\Providers\ConfigWriterServiceProvider', //'App\Providers\ConfigServiceProvider', @@ -166,14 +166,15 @@ 'Caffeinated\Themes\ThemesServiceProvider', 'Caffeinated\Flash\FlashServiceProvider', 'Caffeinated\Shinobi\ShinobiServiceProvider', -'Caffeinated\Menus\MenusServiceProvider', +//'Caffeinated\Menus\MenusServiceProvider', 'Laravel\Socialite\SocialiteServiceProvider', 'Collective\Html\HtmlServiceProvider', 'GrahamCampbell\Throttle\ThrottleServiceProvider', 'yajra\Datatables\DatatablesServiceProvider', 'Intervention\Image\ImageServiceProvider', //'Mcamara\LaravelLocalization\LaravelLocalizationServiceProvider', -'Menu\MenuServiceProvider', +//'Menu\MenuServiceProvider', +'Dimsav\Translatable\TranslatableServiceProvider', ], @@ -231,7 +232,7 @@ 'Theme' => 'Caffeinated\Themes\Facades\Theme', 'Component' => 'Caffeinated\Themes\Facades\Component', 'Flash' => 'Caffeinated\Flash\Facades\Flash', -'Menu' => 'Caffeinated\Menus\Facades\Menu', +//'Menu' => 'Caffeinated\Menus\Facades\Menu', 'Socialize' => 'Laravel\Socialite\Facades\Socialite', 'Form' => 'Collective\Html\FormFacade', 'Html' => 'Collective\Html\HtmlFacade', @@ -241,9 +242,11 @@ //'LaravelLocalization' => 'Mcamara\LaravelLocalization\Facades\LaravelLocalization', 'NestedSet' => 'Kalnoy\Nestedset\NestedSet', 'Node' => 'Kalnoy\Nestedset\Node', -//'Linker' => 'App\Modules\General\Http\Domain\Typi\Facades\TypiFacade', -//'Menus' => 'App\Modules\General\Http\Domain\Typi\Menus\MenuInterface', -'VMenu' => 'Menu\Menu', +//'Linker' => 'App\Modules\General\Http\Domain\Typi\Facades\TypiFacade', +//'Linker' => 'App\Modules\General\Http\Domain\Typi\Menus\LinkerInterface', +//'Menus' => 'App\Modules\General\Http\Domain\Typi\Menus\MenuInterface', +//'VMenu' => 'Menu\Menu', +'Translatable' => 'Dimsav\Translatable\Translatable', /* * DEV Package Alias diff --git a/resources/views/_partials/footer.blade.php b/resources/views/_partials/footer.blade.php index 4d56279..afbe509 100644 --- a/resources/views/_partials/footer.blade.php +++ b/resources/views/_partials/footer.blade.php @@ -17,9 +17,10 @@ {!! $footer !!} --}} +{!! $menus !!}