Merge branch 'dev' into binarity.cz
This commit is contained in:
@@ -11,7 +11,8 @@ class Comment extends Model
|
|||||||
'content_id',
|
'content_id',
|
||||||
'content',
|
'content',
|
||||||
'email',
|
'email',
|
||||||
'name'
|
'name',
|
||||||
|
'approved'
|
||||||
];
|
];
|
||||||
|
|
||||||
public function author()
|
public function author()
|
||||||
|
|||||||
@@ -40,7 +40,8 @@ class CreateNewComment extends Controller
|
|||||||
'content_id' => $article->id,
|
'content_id' => $article->id,
|
||||||
'name' => $name,
|
'name' => $name,
|
||||||
'email' => $email,
|
'email' => $email,
|
||||||
'content' => $content
|
'content' => $content,
|
||||||
|
'approved' => !is_null($user)
|
||||||
]);
|
]);
|
||||||
|
|
||||||
// fire event about new comment
|
// fire event about new comment
|
||||||
|
|||||||
@@ -1,12 +1,9 @@
|
|||||||
<?php namespace Modules\Blog\ArticleList\Providers;
|
<?php namespace Modules\Blog\ArticleList\Providers;
|
||||||
|
|
||||||
use App\Handlers\Registrators\TemplateRegistrator;
|
|
||||||
use Illuminate\Support\ServiceProvider;
|
use Illuminate\Support\ServiceProvider;
|
||||||
use InvalidArgumentException;
|
|
||||||
use Modules\Blog\ArticleList\Handlers\ArticleList;
|
|
||||||
|
|
||||||
class ArticleListServiceProvider extends ServiceProvider {
|
|
||||||
|
|
||||||
|
class ArticleListServiceProvider extends ServiceProvider
|
||||||
|
{
|
||||||
/**
|
/**
|
||||||
* Indicates if loading of the provider is deferred.
|
* Indicates if loading of the provider is deferred.
|
||||||
*
|
*
|
||||||
@@ -42,8 +39,8 @@ class ArticleListServiceProvider extends ServiceProvider {
|
|||||||
*/
|
*/
|
||||||
protected function registerConfig()
|
protected function registerConfig()
|
||||||
{
|
{
|
||||||
$this->publishes([__DIR__.'/../Config/config.php' => config_path('articlelist.php')]);
|
$this->publishes([__DIR__ . '/../Config/config.php' => config_path('articlelist.php')]);
|
||||||
$this->mergeConfigFrom(__DIR__.'/../Config/config.php', 'articlelist');
|
$this->mergeConfigFrom(__DIR__ . '/../Config/config.php', 'articlelist');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -54,7 +51,10 @@ class ArticleListServiceProvider extends ServiceProvider {
|
|||||||
public function registerViews()
|
public function registerViews()
|
||||||
{
|
{
|
||||||
$viewPath = base_path('resources/views/modules/articlelist');
|
$viewPath = base_path('resources/views/modules/articlelist');
|
||||||
$sourcePath = __DIR__.'/../Resources/views';
|
$sourcePath = __DIR__ . '/../Resources/views';
|
||||||
|
if (!is_dir($sourcePath)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$this->publishes([$sourcePath => $viewPath]);
|
$this->publishes([$sourcePath => $viewPath]);
|
||||||
|
|
||||||
@@ -75,7 +75,7 @@ class ArticleListServiceProvider extends ServiceProvider {
|
|||||||
if (is_dir($langPath)) {
|
if (is_dir($langPath)) {
|
||||||
$this->loadTranslationsFrom($langPath, 'articlelist');
|
$this->loadTranslationsFrom($langPath, 'articlelist');
|
||||||
} else {
|
} else {
|
||||||
$this->loadTranslationsFrom(__DIR__ .'/../Resources/lang', 'articlelist');
|
$this->loadTranslationsFrom(__DIR__ . '/../Resources/lang', 'articlelist');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -86,7 +86,6 @@ class ArticleListServiceProvider extends ServiceProvider {
|
|||||||
*/
|
*/
|
||||||
public function provides()
|
public function provides()
|
||||||
{
|
{
|
||||||
return array();
|
return array ();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user