Ejemplo n.º 1
0
 /**
  * Display a listing of the resource.
  * GET /body-types
  *
  * @return Response
  */
 public function index()
 {
     $bodies = BodyTypeRef::paginate();
     return View::make('admin.dicts.list', ['columns' => ['ID', 'Ru', 'AZ', 'Действия'], 'data' => $bodies->transform(function ($b) {
         return ['id' => $b->id, 'ru' => $b->ru, 'az' => $b->az, 'edit' => link_to_action('BodyTypeRefsController@edit', 'редактировать →', [$b->id])];
     }), 'links' => $bodies->links(), 'title' => 'Типы кузова', 'actions' => [['link' => '/admin/body-types/create', 'text' => 'Добавить']]]);
 }