Advertisement
Guest User

Untitled

a guest
Oct 17th, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.34 KB | None | 0 0
  1. // Model
  2.  
  3. <?php
  4.  
  5. class Settings extends Eloquent {
  6.  
  7.     protected $table = 'settings';
  8.  
  9.     public function scopeMango($query)
  10.     {
  11.         return $query->where('key', '=', 'mango');
  12.     }
  13.  
  14. }
  15.  
  16. // Controller
  17.  
  18. class AdminController extends BaseController
  19. {
  20.  
  21.     public function installation_settings()
  22.     {
  23.  
  24.     $mango = Settings::mango();
  25.  
  26.     }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement