.github
app
Abstracts
Builders
BulkActions
Classifiers
Console
Events
Exceptions
Exports
Http
Imports
Interfaces
Jobs
Listeners
Models
Auth
Banking
Common
Document
Module
Module.php
ModuleHistory.php
Setting
Notifications
Observers
Providers
Relations
Reports
Scopes
Traits
Utilities
View
Widgets
bootstrap
config
database
modules
overrides
public
resources
routes
storage
tests
.editorconfig
.env.example
.env.testing
.gitattributes
.gitignore
.htaccess
LICENSE.txt
README.md
SECURITY.md
artisan
composer.json
composer.lock
index.php
manifest.json
nginx.example.com.conf
package-lock.json
package.json
phpunit.xml
presets.js
safelist.txt
serviceworker.js
tailwind.config.js
web.config
webpack.mix.js
39 lines
751 B
PHP
39 lines
751 B
PHP
<?php
|
|
|
|
namespace App\Models\Module;
|
|
|
|
use App\Abstracts\Model;
|
|
|
|
class Module extends Model
|
|
{
|
|
protected $table = 'modules';
|
|
|
|
/**
|
|
* Attributes that should be mass-assignable.
|
|
*
|
|
* @var array
|
|
*/
|
|
protected $fillable = ['company_id', 'alias', 'enabled', 'created_from', 'created_by'];
|
|
|
|
/**
|
|
* The attributes that should be cast.
|
|
*
|
|
* @var array
|
|
*/
|
|
protected $casts = [
|
|
'enabled' => 'boolean',
|
|
];
|
|
|
|
/**
|
|
* Scope alias.
|
|
*
|
|
* @param \Illuminate\Database\Eloquent\Builder $query
|
|
* @param string $alias
|
|
* @return \Illuminate\Database\Eloquent\Builder
|
|
*/
|
|
public function scopeAlias($query, $alias)
|
|
{
|
|
return $query->where('alias', $alias);
|
|
}
|
|
}
|