1
0
mirror of https://github.com/devfake/flox.git synced 2024-11-15 06:32:34 +01:00
flox/backend/app/Genre.php
Viktor Geringer 6f26fdc376
Feature/calendar (#107)
* add more comments for models

* add translation

* add calendar component

* style calendar, add hotkeys

* update readme

* move into own service

* add calendar test

* fix import test, update readme

* fix scrollbar for weeks

* check for empty request

* remove update-genre-list

* relation for tv shows has been forgotten to load

* stop loading twice and prevent overwriting

* remove events outside from month, fix chrome styling
2018-11-09 22:10:33 +01:00

31 lines
492 B
PHP

<?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);
}
}