BEST Offers , For All Sximo 5 LTS licence Holer , Upgrade Licence For only $14 Normal Price on Codecanyon $31
New product Sximopress ( Wordpress Builder ) 1.0 has been realesed . download it now !

S5 Ultimate

The Real PHP Application Makers

Generated Template

1.Start Here

After new module created , it will generated files ( controller , view and model ) . here the sample generated CRUD files

Controller sceleton

<?php namespace App\Http\Controllers;
use App\Library\CrudEngine;

class CrudController extends Controller
{
    public function __construct()
    {
    
    }
   public function index()
   {
        // ... Previous Line Code ....
        
       $table = $this->crudengine->table( $config['table'])->builder( $config )
                ->button( implode(',',$access) )
                ->render();
                
        $this->table['table'] = $table ;
        return view('crud.index',$this->data);
        
        
   }
}
All module configuration such ( title , display , display view and etc ) are handle by ->builder() methode .

Routes

Next , it will genereated and registered new module at /routes/module.php
Route::get('crud','CrudController@index');
Route::post('crud', 'CrudController@index');

2. Model

Honestly , the module does not need model to make it work , but later maybe you may want to use model for customization
<?php namespace App\Models;

use Illuminate\Auth\Authenticatable;
use Illuminate\Database\Eloquent\Model;

class Customers extends Sximo  {
    
    protected $table = 'users';
    protected $primaryKey = 'id';

    public function __construct() {
        parent::__construct();
        
    }

}

3.Index ( grid )

And the last file , is template for displaying Module . the {!! $table !!} is where the CRUD displayed .
@extends('layouts.app')

@section('content')
<div class="page-content row"> 
    <div class="page-content-wrapper m-t">
        <div class="sbox"  >
            <div class="sbox-title" ></div>                
            <div class="sbox-content">
                {!! $table !!}    
            </div>    
        </div>
    </div>        
</div>
  
@endsection
That's it , Thats all what you have after module created .

Please Register Purchased Code for full access Docs


Last Update : 2017-10-14 05:05:14