Exemplo n.º 1
0
});
/******* end middeware:auth ********/
// for TK
Route::post('api/timelog', ['as' => 'timelog.post', 'uses' => 'TimelogController@post']);
Route::get('tk', ['as' => 'tk.index', 'uses' => 'TimelogController@getTkIndex']);
Route::get('api/employee/{field?}/{value?}', ['as' => 'employee.getbyfield', 'uses' => 'EmployeeController@getByField']);
Route::get('auth/google', 'Auth\\AuthController@redirectToProvider');
Route::get('oauth2callback', 'Auth\\AuthController@handleProviderCallback');
Route::get('test', ['uses' => 'BackupController@d']);
get('test/pusher', function () {
    $pusher = app('pusher');
    $pusher->trigger('gi.cashier', 'auth', ['module' => 'Giligan\'s Cashier Module', 'message' => 'hello world!']);
    return;
});
get('test/component', function () {
    return App\Models\Component::with('compcat.expense.expscat')->find('06156841637011E5B83800FF59FBB323');
});
get('test/compledger', function () {
    return App\Models\Compledger::with('branch')->get();
});
Route::get('pepsi', ['uses' => 'DashboardController@pepsi']);
get('date/compare', function () {
    $backupdate = Carbon\Carbon::parse('2016-05-25');
    $last_purchase = Carbon\Carbon::parse('2016-05-24');
    echo $last_purchase->format('Y-m-d') . ' < ' . $backupdate->format('Y-m-d') . '</br>';
    if ($last_purchase->lte($backupdate)) {
        echo 'process all transaction ';
    } else {
        echo 'process only transaction dated as backup date';
    }
});
Exemplo n.º 2
0
/*************************************************************************************/
get('compcat-expense', function () {
    $compcats = App\Models\Compcat::all();
    foreach ($compcats as $compcat) {
        $expense = App\Models\Expense::where('code', 'LIKE', '%' . $compcat->code . '%')->get()->first();
        if (empty($expense)) {
            echo 'empty<br>';
        } else {
            echo $expense->id . '<br>';
            $compcat->expenseid = $expense->id;
            //$compcat->save();
        }
    }
});
get('link-comp-cat', function () {
    $components = App\Models\Component::all();
    foreach ($components as $component) {
        $compcat = App\Models\Compcat::where('descriptor', 'LIKE', '%' . $component->compcatid . '%')->get()->first();
        if (empty($compcat)) {
            echo 'empty<br>';
        } else {
            echo $compcat->id . '<br>';
            $component->compcatid = $compcat->id;
            //$component->save();
        }
    }
});
Route::get('filess', function () {
    $files = new Filesystem();
    return dd($files->exists(public_path() . '\\uploads\\test.zip'));
});