Commit 30a6701a authored by Nicolas Widart's avatar Nicolas Widart

fix merge conflict

parents 4b3bc4c8 43a56a34
<?php namespace Modules\Core\Services;
use Symfony\Component\Process\Process;
class Composer extends \Illuminate\Foundation\Composer
{
protected $outputHandler = null;
private $output;
/**
* Enable real time output of all commands.
*
* @param $command
* @return void
*/
public function enableOutput($command)
{
$this->output = function ($type, $buffer) use ($command) {
if (Process::ERR === $type) {
$command->info(trim('[ERR] > '.$buffer));
} else {
$command->info(trim('> '.$buffer));
}
};
}
/**
* Disable real time output of all commands.
*
* @return void
*/
public function disableOutput()
{
$this->output = null;
}
/**
* Update all composer packages.
*
* @param string $package
* @return void
*/
public function update($package = null)
{
if (!is_null($package)) {
$package = '"' . $package . '"';
}
$process = $this->getProcess();
$process->setCommandLine(trim($this->findComposer() . ' update ' . $package));
$process->run($this->output);
}
/**
* Require a new composer package.
*
* @param string $package
* @return void
*/
public function install($package)
{
if (!is_null($package)) {
$package = '"' . $package . '"';
}
$process = $this->getProcess();
$process->setCommandLine(trim($this->findComposer() . ' require ' . $package));
$process->run($this->output);
}
public function remove($package)
{
if (!is_null($package)) {
$package = '"' . $package . '"';
}
$process = $this->getProcess();
$process->setCommandLine(trim($this->findComposer() . ' remove ' . $package));
$process->run($this->output);
}
}
......@@ -19,7 +19,7 @@ return [
|--------------------------------------------------------------------------
*/
'front-themes' => [
'bootstrap',
'demo',
'default'
]
];
......@@ -186,6 +186,19 @@ class InstallCommand extends Command
$this->call('publish:config', ['package' => 'dimsav/laravel-translatable']);
$this->call('publish:config', ['package' => 'mcamara/laravel-localization']);
$this->call('publish:config', ['package' => 'pingpong/modules']);
$this->call('publish:config', ['package' => 'mpedrera/themify']);
$this->adaptThemifyConfiguration();
}
/**
* Configure the mpedrera/themify configuration
* @throws \Illuminate\Filesystem\FileNotFoundException
*/
private function adaptThemifyConfiguration()
{
$themifyConfig = $this->finder->get('config/packages/mpedrera/themify/config.php');
$themifyConfig = str_replace('app_path()', 'base_path()', $themifyConfig);
$this->finder->put('config/packages/mpedrera/themify/config.php', $themifyConfig);
}
/**
......@@ -318,7 +331,7 @@ class InstallCommand extends Command
$path = "config/packages/cartalyst/{$driver}/config.php";
$config = $this->finder->get($path);
$config = str_replace($search, "Modules\\User\\Entities\\{$Driver}\\User", $config);
$config = str_replace($search, "Modules\\User\\Entities\\{$Driver}User", $config);
$this->finder->put($path, $config);
}
......
......@@ -2,51 +2,11 @@
use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider;
use Illuminate\Routing\Router;
use Mcamara\LaravelLocalization\Facades\LaravelLocalization;
class RoutingServiceProvider extends ServiceProvider
{
public function before(Router $router)
{
// $modules = app('modules');
// $routes = app('Asgard.routes');
// foreach ($modules->enabled() as $module) {
// $router->group(
// ['namespace' => "Modules\\$module\\Http\\Controllers"],
// function (Router $router) use ($module, $routes) {
// foreach (LaravelLocalization::getSupportedLocales() as $locale => $language) {
// if ($this->moduleHasRoute($routes, $module, $locale)) {
// $uri = $routes[strtolower($module)][$locale];
// $router->get(
// $uri,
// [
// 'as' => "{$locale}.{$module}",
// 'uses' => 'PublicController@index'
// ]
// );
// $router->get(
// $uri . '/{slug}',
// [
// 'as' => "{$locale}.{$module}.slug",
// 'uses' => 'PublicController@show'
// ]
// );
// }
// }
// }
// );
// }
}
/**
* @param $routes
* @param $module
* @param $locale
* @return bool
*/
private function moduleHasRoute($routes, $module, $locale)
{
return isset($routes[strtolower($module)][$locale]);
}
public function map(Router $router)
......
......@@ -10,6 +10,7 @@
<div class="navbar-right">
<ul class="nav navbar-nav">
<li><a href="{{ URL::to('/') }}" target="_blank"><i class="fa fa-eye"></i> View Website</a></li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
<i class="fa fa-flag"></i>
......@@ -55,12 +56,7 @@
</li>
<!-- Menu Footer-->
<li class="user-footer">
<div class="pull-left">
<a href="{{ URL::route('dashboard.user.edit', [$user->id]) }}" class="btn btn-default btn-flat">Profile</a>
</div>
<div class="pull-right">
<a href="{{ URL::route('logout') }}" class="btn btn-default btn-flat">Sign out</a>
</div>
</li>
</ul>
</li>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment