Apply Laravel coding style
Shift automatically applies the Laravel coding style - which uses the PSR-12 coding style as a base with some minor additions. You may customize the code style applied by configuring [Pint](https://laravel.com/docs/pint), [PHP CS Fixer](https://github.com/FriendsOfPHP/PHP-CS-Fixer), or [PHP CodeSniffer](https://github.com/squizlabs/PHP_CodeSniffer) for your project root. For more information on customizing the code style applied by Shift, [watch this short video](https://laravelshift.com/videos/shift-code-style).
This commit is contained in:
@@ -17,14 +17,15 @@ class Article extends BaseModel
|
||||
*/
|
||||
protected $searchable = [
|
||||
'columns' => [
|
||||
'name' => 10,
|
||||
'slug' => 10,
|
||||
'name' => 10,
|
||||
'slug' => 10,
|
||||
'description' => 10,
|
||||
],
|
||||
];
|
||||
|
||||
/* define the table name to get the properties of article model as protected */
|
||||
protected $table = 'kb_article';
|
||||
|
||||
/* define the fillable field in the table */
|
||||
protected $fillable = ['name', 'slug', 'description', 'type', 'status', 'publish_time'];
|
||||
}
|
||||
|
@@ -7,5 +7,6 @@ use App\BaseModel;
|
||||
class Category extends BaseModel
|
||||
{
|
||||
protected $table = 'kb_category';
|
||||
|
||||
protected $fillable = ['id', 'slug', 'name', 'description', 'status', 'parent', 'created_at', 'updated_at'];
|
||||
}
|
||||
|
@@ -11,6 +11,7 @@ use Illuminate\Database\Eloquent\Model;
|
||||
class Comment extends BaseModel
|
||||
{
|
||||
protected $table = 'kb_comment';
|
||||
|
||||
protected $fillable = ['article_id', 'name', 'email', 'website', 'comment', 'status'];
|
||||
|
||||
public function setNameAttribute($value)
|
||||
|
@@ -7,5 +7,6 @@ use App\BaseModel;
|
||||
class Contact extends BaseModel
|
||||
{
|
||||
protected $table = 'contact';
|
||||
|
||||
protected $fillable = ['name', 'subject', 'email', 'message'];
|
||||
}
|
||||
|
@@ -7,5 +7,6 @@ use App\BaseModel;
|
||||
class Country extends BaseModel
|
||||
{
|
||||
public $table = 'country';
|
||||
|
||||
protected $fillable = ['country_code', 'country_name'];
|
||||
}
|
||||
|
@@ -7,5 +7,6 @@ use App\BaseModel;
|
||||
class Faq extends BaseModel
|
||||
{
|
||||
protected $table = 'faq';
|
||||
|
||||
protected $fillable = ['id', 'faq'];
|
||||
}
|
||||
|
@@ -7,5 +7,6 @@ use App\BaseModel;
|
||||
class Footer extends BaseModel
|
||||
{
|
||||
protected $table = 'footer';
|
||||
|
||||
protected $fillable = ['title', 'footer'];
|
||||
}
|
||||
|
@@ -7,5 +7,6 @@ use App\BaseModel;
|
||||
class Footer2 extends BaseModel
|
||||
{
|
||||
protected $table = 'footer2';
|
||||
|
||||
protected $fillable = ['title', 'footer'];
|
||||
}
|
||||
|
@@ -7,5 +7,6 @@ use App\BaseModel;
|
||||
class Footer3 extends BaseModel
|
||||
{
|
||||
protected $table = 'footer3';
|
||||
|
||||
protected $fillable = ['title', 'footer'];
|
||||
}
|
||||
|
@@ -7,5 +7,6 @@ use App\BaseModel;
|
||||
class Footer4 extends BaseModel
|
||||
{
|
||||
protected $table = 'footer4';
|
||||
|
||||
protected $fillable = ['title', 'footer'];
|
||||
}
|
||||
|
@@ -7,5 +7,6 @@ use App\BaseModel;
|
||||
class Options extends BaseModel
|
||||
{
|
||||
protected $table = 'options';
|
||||
|
||||
protected $fillable = ['option_name', 'option_value', 'created_at', 'updated_at'];
|
||||
}
|
||||
|
@@ -7,5 +7,6 @@ use App\BaseModel;
|
||||
class Page extends BaseModel
|
||||
{
|
||||
protected $table = 'kb_pages';
|
||||
|
||||
protected $fillable = ['name', 'slug', 'status', 'visibility', 'description'];
|
||||
}
|
||||
|
@@ -9,6 +9,7 @@ class Relationship extends BaseModel
|
||||
/* define the table */
|
||||
|
||||
protected $table = 'kb_article_relationship';
|
||||
|
||||
/* define fillable fields */
|
||||
protected $fillable = ['id', 'category_id', 'article_id'];
|
||||
}
|
||||
|
@@ -10,6 +10,7 @@ class Settings extends BaseModel
|
||||
* @param $table, $fillable
|
||||
*/
|
||||
protected $table = 'kb_settings';
|
||||
|
||||
protected $fillable = ['language', 'dateformat', 'company_name', 'website', 'phone', 'address', 'logo', 'timezone',
|
||||
'background', 'version', 'pagination', 'port', 'host', 'encryption', 'email', 'password', ];
|
||||
}
|
||||
|
@@ -7,5 +7,6 @@ use App\BaseModel;
|
||||
class Side1 extends BaseModel
|
||||
{
|
||||
protected $table = 'side1';
|
||||
|
||||
protected $fillable = ['title', 'content'];
|
||||
}
|
||||
|
@@ -7,5 +7,6 @@ use App\BaseModel;
|
||||
class Side2 extends BaseModel
|
||||
{
|
||||
protected $table = 'side2';
|
||||
|
||||
protected $fillable = ['title', 'content'];
|
||||
}
|
||||
|
@@ -7,5 +7,6 @@ use App\BaseModel;
|
||||
class Social extends BaseModel
|
||||
{
|
||||
protected $table = 'social';
|
||||
|
||||
protected $fillable = ['linkedin', 'stumble', 'google', 'deviantart', 'flickr', 'skype', 'rss', 'twitter', 'facebook', 'youtube', 'vimeo', 'pinterest', 'dribbble', 'instagram'];
|
||||
}
|
||||
|
@@ -7,5 +7,6 @@ use App\BaseModel;
|
||||
class Timezone extends BaseModel
|
||||
{
|
||||
protected $table = 'timezones';
|
||||
|
||||
protected $fillable = ['id', 'name', 'location'];
|
||||
}
|
||||
|
@@ -7,5 +7,6 @@ use App\BaseModel;
|
||||
class Zone extends BaseModel
|
||||
{
|
||||
protected $table = 'zone';
|
||||
|
||||
protected $fillable = ['zone_id', 'country_code', 'zone_name'];
|
||||
}
|
||||
|
Reference in New Issue
Block a user