Setting.php 368 B

12345678910111213141516171819
  1. <?php
  2. namespace App\Models;
  3. use Illuminate\Database\Eloquent\Factories\HasFactory;
  4. use Illuminate\Database\Eloquent\Model;
  5. class Setting extends Model
  6. {
  7. use HasFactory;
  8. public function user() {
  9. return $this->belongsTo(User::class, 'user');
  10. }
  11. public function scopeNextFilm($query) {
  12. return $query->where('key', 'nextfilm');
  13. }
  14. }