-
Notifications
You must be signed in to change notification settings - Fork 0
/
Blog.php
31 lines (25 loc) · 720 Bytes
/
Blog.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<?php namespace Pmesolution\Blog\Components;
use Cms\Classes\ComponentBase;
use Pmesolution\Blog\Models\Post;
use Session;
class Blog extends ComponentBase
{
public function articles(){
//conditions here
return Post::where('lang_id', Session::get('lang_id'))->get();
}
public function onRun(){
$this->addCss('/plugins/pmesolution/blog/assets/css/blog.css');
}
public function componentDetails()
{
return [
'name' => 'pmesolution.blog::lang.components.blog.name',
'description' => 'pmesolution.blog::lang.components.blog.description',
];
}
public function defineProperties()
{
return [];
}
}