Skip to content

Instantly share code, notes, and snippets.

@sergiopvilar
Created September 10, 2014 18:01
Show Gist options
  • Save sergiopvilar/90e885b9113adbac2609 to your computer and use it in GitHub Desktop.
Save sergiopvilar/90e885b9113adbac2609 to your computer and use it in GitHub Desktop.
<?php
class ConfigurationController extends BaseController{
protected $layout = 'layouts.dashboard';
function index(){
$articlesNumber = array(10, 20, 40, 60, 80, 100);
$model = UserBO::getConf();
$this->layout->content = View::make('configuration.index')
->with(compact('model'))
->with('articlesNumber', $articlesNumber);
}
}
<?php
class UserBO{
public static function getConf(){
return Userconf::where('user_id', Auth::getUser()->getId())->first();
}
public static function save($c){
return $c->save();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment