public static function getList($model)
 {
     if ($model->count() > 0) {
         $listComposer = new ModelListComposer();
         $listComposer->model = $model;
         $collection = $model->all();
         $headers = $listComposer->generateHeaders($collection);
         $arrayData = $listComposer->generateArrayData($collection);
         $table = TableRenderer::createTable($headers, $arrayData);
         return $table;
     }
 }
 public function modelList($model)
 {
     $model = MagickEloquent::getModel($model);
     $list = ModelListComposer::getList($model);
     return view("magia::list", array("list" => $list));
 }