Ejemplo n.º 1
0
 * @author Emay Komarudin
 *
 **/
Route::group(['prefix' => 'generate'], function () {
    /*Main Page*/
    Route::get('/', function () {
        if (Input::has('p')) {
            $p = Input::get('p');
            if ($p == 'mib') {
                return 'Welcome to Main Generate MIB';
            }
        }
    });
    /*User admin*/
    Route::get('useradmin', function () {
        $useradmin = \Emayk\Ics\Repo\Users\Users::generateUserAdmin();
        return $useradmin;
    });
    /*Legalitas*/
    Route::get('legality', function () {
        $legality = new \Emayk\Ics\Repo\Legality\Legality();
        if ($legality::hasDefault()) {
            return 'Sudah ada default legality';
        } else {
            $idcreated = $legality->getIdsDefaultOrCreate();
            return 'Legalitas sudah digenerate dengan id ' . $idcreated;
        }
    });
    /*Type Supplier dan Buyer */
    Route::get('typesupbuy', function () {
        $type = new \Emayk\Ics\Repo\Typesuppliersbuyers\Typesuppliersbuyers();
Ejemplo n.º 2
0
Archivo: test.php Proyecto: emayk/ics
 /**
  * Generate Legality
  * $ids = true, menghasilkan array berisi id yang telah dibuat;
  * \Emayk\Ics\Repo\Legality\Legality::generateMassiveLegality($ids)
  */
 Route::get('legality', function () {
     return \Emayk\Ics\Repo\Legality\Legality::generateMassiveLegality();
 });
 /**
  * Generate Locations
  */
 Route::get('locations', function () {
     return \Emayk\Ics\Repo\Locations\Locations::generateMassiveLocation();
 });
 Route::get('useradmin', function () {
     return \Emayk\Ics\Repo\Users\Users::generateUserAdmin();
 });
 Route::get('users', function () {
     $fake = new \Emayk\Ics\Support\Dummy\Faker\AbstractGenerate();
     return $fake->getFake()->firstName;
 });
 Route::get('app.js', function () {
     $test = time();
     $contents = View::make('ics::extjs.app', compact('test'));
     $response = Response::make($contents);
     $response->header('Content-Type', 'application/javascript');
     return $response;
 });
 Route::get('changelog', function () {
     $changelog = Icsconfig::getChangeLog();
     return $changelog;