1
0
mirror of https://github.com/devfake/flox.git synced 2024-11-15 14:42:31 +01:00
flox/backend/app/Genre.php

31 lines
492 B
PHP
Raw Normal View History

<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Genre extends Model {
/**
* No timestamps needed.
*
* @var bool
*/
public $timestamps = false;
/**
* Don't auto-apply mass assignment protection.
*
* @var array
*/
protected $guarded = [];
/**
* Scope to find the genre by name.
*/
public function scopeFindByName($query, $genre)
{
return $query->where('name', $genre);
}
}