This is a formatter columns example. It provide functionality to format value of specific column to specific format. In this example it format name with wrap it using <p class="text-primary"></p>

	$Scaffolding= new Scaffolding("categories");
	// Set columns manually
	$columns       = array('no', 'name', 'actions');
	$Scaffolding->setColumns($columns);
	// Set formatter for name column
	$Scaffolding->addFormatterColumn('name', array($this, 'formatterName'));
	$content= $Scaffolding->render();
	$parameters= array(
		'scaffolding'=>$content
	);
	return view('demo', $parameters);
	

This is callback for formatter name column.

	/**
	* Formatter for title column
	* 
	* @param  \App\Libraries\Scaffolding\Model $model
	* 
	* @return  void
	*/
    public function formatterName($model)
    {
		echo '

' . $model['name'] . '

'; }
No
Name
Actions
1

Teste

2

Test111

3

test

4

sasasdsadaaa

5

Sarel

6

sadasd

7

rfvddwfw

8

raja

9

qqq

10

Prova

Showing 1 to 10 of 70 entries