Skip to content

Commit

Permalink
The type of 'content' field is changed to redactor in BlogController.
Browse files Browse the repository at this point in the history
  • Loading branch information
alenoosh committed Jul 13, 2015
1 parent 3c5e2de commit d09a59a
Showing 1 changed file with 26 additions and 34 deletions.
60 changes: 26 additions & 34 deletions src/controllers/panel/BlogController.php
Original file line number Diff line number Diff line change
@@ -1,52 +1,44 @@
<?php namespace Serverfireteam\blog\panel;
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/

use Serverfireteam\Panel\CrudController;
use \Illuminate\Routing\Controllers;
/**
* Description of Blog
*
* @author alireza
*/

class BlogController extends \Serverfireteam\Panel\CrudController {
//put your code here
public function all($entity){
parent::all($entity);

public function all($entity) {

parent::all($entity);

$this->filter = \DataFilter::source(new \App\Blog());
$this->filter->add('id', 'ID', 'text');
$this->filter->add('title', 'Title', 'text');
$this->filter->submit('search');
$this->filter->reset('reset');
$this->filter->build();

$this->grid = \DataGrid::source($this->filter);
$this->grid->add('id','ID', true)->style("width:100px");
$this->grid->add('title','title');
$this->grid->add('socialPoint','social Point');
$this->addStylesToGrid();
$this->grid->add('id', 'ID', true)->style("width:100px");
$this->grid->add('title', 'title');
$this->grid->add('socialPoint', 'social Point');
$this->addStylesToGrid();

return $this->returnView();
}


public function edit($entity){


public function edit($entity) {

parent::edit($entity);

$this->edit = \DataEdit::source(new \App\Blog());

$this->edit->label('Edit Project');
$this->edit->add('title','post title', 'text')->rule('required|min:3');
$this->edit->add('author','author', 'text')->rule('required|min:2');
$this->edit->add('content','content', 'textarea')->rule('required');
$this->edit->add('image','image', 'image')->move('uploads/');
$this->edit->add('color','Color','colorpicker');
$this->edit->add('public','public','radiogroup')->option(0,'Draft')->option(1,'Ready');

$this->edit->label('Edit Project');
$this->edit->add('title', 'post title', 'text')->rule('required|min:3');
$this->edit->add('author', 'author', 'text')->rule('required|min:2');
$this->edit->add('content', 'content', 'redactor')->rule('required');
$this->edit->add('image', 'image', 'image')->move('uploads/');
$this->edit->add('color', 'Color', 'colorpicker');
$this->edit->add('public', 'public', 'radiogroup')->option(0, 'Draft')->option(1, 'Ready');

return $this->returnEditView();
}
}

0 comments on commit d09a59a

Please sign in to comment.