public function index() { $this->data['personales'] = Personal::all(); $this->data['personalActive'] = 'active'; Debugbar::info($this->data['personales']); return View::make('admin.personal.index', $this->data); }
public function boot() { $this->loadViewsFrom(realpath(__DIR__ . '/../views'), 'maikblog'); $this->publishes([realpath(__DIR__ . '/../views') => base_path('resources/views/vendor/maikblog')]); $this->setupRoutes($this->app->router); // this for conig $this->publishes([__DIR__ . '/config/maikblog.php' => config_path('maikblog.php')], 'config'); //this for migrations $this->publishes([__DIR__ . '/database/migrations/' => database_path('migrations')], 'migrations'); //this for css and js $this->publishes([realpath(__DIR__ . '/../assets') => public_path('maiklez/maikblog')], 'public'); \Validator::extend('tag_rule', function ($attribute, $value, $parameters) { $tags = explode(',', $value); // remove empty items from array $tags = array_filter($tags); // trim all the items in array $tags = array_map('trim', $tags); \Debugbar::info($tags); foreach ($tags as $tag) { if ($tag === "") { return false; } } return true; }); \Validator::replacer('tag_rule', function ($message, $attribute, $rule, $parameters) { return str_replace("no white spaces are allow"); }); }
/** * @param $password * @param $loginName * @param bool $flag * @return Users */ public function getUserByCredential($password, $loginName, $flag = null) { if ($flag == null) { $flag = false; } \Debugbar::info($flag); // TODO: Implement getUserByCredential() method. if (!$flag) { $user = $this->model->newQuery()->with('getGroup')->where('email', '=', $loginName)->where('ugroup', '!=', 2)->where('Active', '=', 1)->first(); if ($user != null) { if (\Hash::check($password, $user->getPassword())) { \Debugbar::addMessage('hash matches - ' . Hash::make($password)); return $user; } else { \Debugbar::addMessage('hash dose not match'); return null; } } else { return null; } } else { $user = $this->model->newQuery()->with('getGroup')->where('Password', '=', $password)->where('email', '=', $loginName)->where('Active', '=', 1)->first(); if ($user != null) { return $user; } else { return null; } } }
public function index() { $this->data['personales'] = Personal::where('tipoPersonal', '=', 'Voluntario')->get(); $this->data['personalVoluntarioActive'] = 'active'; Debugbar::info($this->data['personales']); return View::make('admin.personalVoluntario.index', $this->data); }
public function get($key) { $val = \App\Config::where('key', $key)->pluck('value'); \Debugbar::info($key . ' : ' . $val); $val = unserialize($val); return $val; }
/** * [getData] * @return [type] [description] */ public function getData() { $Model = $this->modelName; $all_reminders = $Model::all($this->dataTableColumns); $data = []; foreach ($all_reminders as $reminder) { // load relations $load_curr_project = $reminder->project; $load_curr_user = $reminder->user; $curr_reminder = $reminder; Debugbar::info($reminder); if (isset($reminder->user_id) && isset($reminder->project_id)) { $curr_proj = (object) ['id' => $reminder->reminder_id, 'name' => $reminder->project->name]; $curr_user = (object) ['id' => $reminder->user_id, 'username' => $reminder->user->username]; $curr_entry = (object) ['DT_RowId' => 'row_' . $reminder->id, 'reminders' => $curr_reminder, 'users' => $curr_user, 'projects' => $curr_proj]; $data[] = $curr_entry; } } $all_projects = Project::orderBy('name', 'DESC')->get(['id', 'name']); $projects = []; foreach ($all_projects as $project) { $tmp_project = (object) ['value' => $project->id, 'label' => $project->name]; $projects[] = $tmp_project; } $all_users = User::all(['id', 'username']); $users = []; foreach ($all_users as $user) { $tmp_user = (object) ['value' => $user->id, 'label' => $user->username]; $users[] = $tmp_user; } $ret = ['data' => $data, 'projects' => $projects, 'users' => $users]; return Response::json($ret); }
/** * Display a list of all blog post to admin. * * @param Request $request * @return Response */ public function index(Request $request) { $posts = Post::all(); $bestTag = Tag::with('postCount')->get()->sortByDesc('postCount'); $bestCat = Category::with('postCount')->get()->sortByDesc('postCount'); \Debugbar::info($bestTag); return view('maikblog::table', ['posts' => $posts, 'best_tag' => $bestTag, 'best_cat' => $bestCat]); }
public function index() { $this->data['beneficiarios'] = Beneficiario::all(); $this->data['responsables'] = Personal::where('tipoPersonal', '=', ''); Debugbar::info($this->data['beneficiarios']); $this->data['beneficiariosActive'] = 'active'; return View::make('admin.beneficiarios.index', $this->data); }
public function show($teamID, $year) { $team = Team::leftJoin('league', 'lgID', '=', 'league.id')->leftJoin('division', 'divID', '=', 'division.id')->where('teamID', '=', $teamID)->where('yearID', '=', $year)->first(); \Debugbar::info($team); $battingGrids = BattingController::team($teamID, $year); $pitchingGrids = PitchingController::team($teamID, $year); $fieldingGrids = FieldingController::team($teamID, $year); return view('teams.show')->with(['team' => $team, 'year' => $year, 'battingGrids' => $battingGrids, 'pitchingGrids' => $pitchingGrids, 'fieldingGrids' => $fieldingGrids]); }
public function subtest() { $localeCode = LaravelLocalization::getCurrentLocale(); $urltrans = trans('test::routes.subtest'); \Debugbar::info($urltrans); $test = LaravelLocalization::getLocalizedURL($localeCode, route('test')); \Debugbar::info($test); return '<p>Sub-test</p><p><b>Language</b>: ' . $localeCode . '</p><p>Our translation url: ' . $urltrans . '</p>'; }
public function login() { $credential = array('password' => \Input::get('password'), 'login' => \Input::get('email')); \Debugbar::info($credential); if (\Dobby::login($credential)) { return \Redirect::to('admin'); } return view("admin.login"); }
/** * Show the form for creating a new resource. * * @return \Illuminate\Http\Response */ public function pay() { \Pingpp\Pingpp::setApiKey('sk_test_urT4i5iPOCiHPmj5K0uLO0GK'); $res = \Pingpp\Charge::create(array('order_no' => '0123456789', 'amount' => '100', 'app' => array('id' => 'app_9iLSeP8Oi5SGznbj'), 'channel' => 'upacp_pc', 'currency' => 'cny', 'client_ip' => '127.0.0.1', 'subject' => 'Your Subject', 'body' => 'Your Body', 'extra' => array('success_url' => 'http://www.jindanlan.com/'))); \Debugbar::info($res); $content = $res; $status = 200; $value = "text/json"; return response($content, $status)->header('Content-Type', $value); }
public function getData() { $models = TaskTemplate::select($this->dataTableColumns); return Datatables::of($models)->addColumn('Group', function ($m) { $ret = TaskGroup::find($m->group_id)->name; Debugbar::info($ret); return $ret; })->removeColumn('group_id')->add_column('actions', '<a href="{{{ URL::to(\'/admin/tasktemplates/\' . $id . \'/edit\' ) }}}" class="iframe btn btn-xs btn-default cboxElement">{{{ Lang::get(\'button.edit\') }}}</a> <a href="{{{ URL::to(\'/admin/tasktemplates/\' . $id . \'/delete\' ) }}}" class="iframe btn btn-xs btn-danger cboxElement">{{{ Lang::get(\'button.delete\') }}}</a>')->make(); }
public function checkEmailExists(Request $request) { $email = $request->get('email'); \Debugbar::info("comprovant email " . $email); //TODO comprovar email correctament if ($this->checkEmail($email)) { return "true"; } else { return "false"; } }
public function getActor($id) { $url = html_entity_decode("http://api.themoviedb.org/3/person/" . $id . "/movie_credits?"); $options = array("api_key" => "af5b30b8759307d572388fceb9fa4331", "sort_by" => "release_date.desc"); $url .= http_build_query($options, '', '&'); $myData = file_get_contents($url) or die(print_r(error_get_last())); $movies = json_decode($myData); foreach ($movies->cast as $i => $v) { \Debugbar::info($v); } return view('index')->with('data', $movies->cast); }
public function index() { $items = array('items' => ['Pack luggage', 'Go to airport', 'Arrive in San Juan']); //dd($items); //\Log::error($items); /* $monolog = \Log::getMonolog(); $monolog->pushHandler(new \Monolog\Handler\FirePHPHandler()); $monolog->addInfo('Log Message', $items); */ \Debugbar::info('Something is wrong'); return view('home'); }
public function login(array $credential, $remember = false) { $this->user = $this->userProvider->getUserByCredential($credential['password'], $credential['login'], null); \Debugbar::info($this->user); if ($this->user != null) { \Debugbar::addMessage($this->user->getLogin()); $this->cookie->queue($this->cookie->make('uid', $this->user->getLogin(), 30, '/')); $this->cookie->queue($this->cookie->make('pwd', $this->user->getPassword(), 30, '/')); \Debugbar::info($this->cookie->getQueuedCookies()); return true; } else { return false; } }
function showMMDDYYYY($YYYYMMDD) { Debugbar::info($YYYYMMDD); if ($YYYYMMDD == '0000-00-00') { return ''; } if (substr($YYYYMMDD, 0, 11) == '-0001-11-30') { return ''; } $mm = substr($YYYYMMDD, 5, 2); $dd = substr($YYYYMMDD, 8, 2); $yyyy = substr($YYYYMMDD, 0, 4); return $mm . '-' . $dd . '-' . $yyyy; }
public function getPerson($name = false, $where = []) { if (env('APP_DEBUG', false)) { $where_str = ''; if (!empty($where)) { $where_str = 'where '; foreach ($where as $field => $val) { $where_str .= ',' . $field . '=' . $val; } } \Debugbar::info('PersonRepository::getPerson(' . ' name:' . $name . ') ' . $where_str); } $people = false; if ($name) { $where['name'] = $name; } $people = empty($where) ? Person::all() : Person::where($where)->get(); // // prepare results: // fixup sn urls from accounts and photos // if (!empty($people)) { foreach ($people as $key => $person) { if (isset($person->accounts)) { $accts = explode(',', $person->accounts); foreach ($accts as $act) { $pair = explode('=', $act); if (!empty($pair) && count($pair) == 2) { $url = $this->getUrl($pair[0], $pair[1]); if ($url) { $people[$key][$pair[0]] = $url; } } } } if (isset($person->photos)) { $photos = explode(',', $person->photos); foreach ($photos as $photo) { $pair = explode('=', $photo); if (!empty($pair) && count($pair) == 2) { $people[$key][$pair[0] . '_photo'] = $pair[1]; } } } \Debugbar::info('PersonRepository::getPerson - ' . print_r($people[$key], true)); } } return $people; }
public function startGame($id) { \Debugbar::info($id); $game = Game::find($id); // $players = DB::select( DB::raw("SELECT game_id FROM game_player gp join games g on gp.game_id = g.game_id join players p on gp.player_id = p.player_id")); // \Debugbar::info($players); if ($game != null) { /* for($i=0; i<$players; $i++){ $players->status = "Playing"; $players->save(); }*/ $game->status = "Playing"; $game->save(); } return response()->json(['game' => $game]); }
/** * Checking permission for choosed user * * @return boolean */ public function checkPermission($user, $ability, $arguments) { \Debugbar::info($user->id . ' - ' . $ability); if ($user->role === 'admin') { return true; } // У пользователя роль, которой нет в списке $roles = $this->getRoles(); if (!isset($roles[$user->role])) { return null; } \Debugbar::info('Роль опознана'); // Ищем разрешение для данной роли среди наследников текущего разрешения $role = $roles[$user->role]; $permissions = $this->getPermissions(); $current = $ability; // Если для разрешения указана замена - элемент 'equal', то проверяется замена // (только при наличии оригинального разрешения в роли). // Callback оригинального не вызывается. if (in_array($current, $role) and isset($permissions[$current]['equal'])) { $current = $permissions[$current]['equal']; \Debugbar::info('Разрешение равно ' . $current); } while (!in_array($current, $role) and isset($permissions[$current]['next'])) { $current = $permissions[$current]['next']; \Debugbar::info($current); } if (!in_array($current, $role)) { // Ни одного подходящего разрешения небыло найдено \Debugbar::info('Разрешение ' . $current . ' не подходящее'); return null; } $methods = get_class_methods($this); $method = camel_case($current); if (in_array($method, $methods)) { // Преобразуем массив в единичный элемент если он содержит один элемент // или это ассоциативный массив с любым кол-вом элементов if (!empty($arguments)) { $arg = (count($arguments) > 1 or array_keys($arguments)[0] !== 0) ? $arguments : last($arguments); } else { $arg = null; } return $this->{$method}($user, $arg, $ability) ? true : null; } return true; }
public function askPermission() { $provider = new League\OAuth2\Client\Provider\Facebook(array('clientId' => '372319239612356', 'clientSecret' => '8c78a15dfaa0bf16a81191b68ec89638', 'redirectUri' => 'http://www.subbly.dev/auth')); if (!isset($_GET['code'])) { // If we don't have an authorization code then get one header('Location: ' . $provider->getAuthorizationUrl()); exit; } else { // Try to get an access token (using the authorization code grant) $token = $provider->getAccessToken('authorization_code', ['code' => $_GET['code']]); // Optional: Now you have a token you can look up a users profile data try { // We got an access token, let's now get the user's details $userDetails = $provider->getUserDetails($token); // Use these details to create a new profile printf('Hello %s!', $userDetails->firstName); } catch (Exception $e) { // Failed to get user details exit('Oh dear...'); } try { // Find the user using the user id $user = Sentry::findUserByLogin($userDetails->email); // Log the user in Sentry::login($user, false); // return Redirect::route('home'); } catch (Cartalyst\Sentry\Users\UserNotFoundException $e) { // Register the user $user = Sentry::register(array('activated' => 1, 'email' => $userDetails->email, 'password' => Hash::make(uniqid(time())), 'first_name' => $userDetails->firstName)); // $usergroup = Sentry::getGroupProvider()->findById(2); // $user->addGroup($usergroup); Sentry::login($user, false); // return Redirect::route('account'); } Debugbar::info($userDetails); Debugbar::info($user); // exit; // Use this to interact with an API on the users behalf echo $token->accessToken; // Use this to get a new access token if the old one expires echo $token->refreshToken; // Number of seconds until the access token will expire, and need refreshing echo $token->expires; } }
/** * [getData - get all projects data for DT] * @return [json] [DT compatible object] */ public function getData($model = null) { $Model = $this->modelName; $num_skip = 0; $num_items = 10; $recordsTotal = 0; $recordsFiltered = 0; if (isset($_GET['start'])) { $num_skip = (int) $_GET['start']; } if (isset($_GET['length'])) { $num_items = (int) $_GET['length']; } if (isset($_GET['search'])) { $search_value = $_GET['search']['value']; } $all_projects = Project::orderBy('projects.id', 'DESC'); if ($model !== null) { $all_projects->where('projects.company_id', '=', (int) $model->id); if (!empty($search_value)) { $all_projects->whereRaw("(projects.name LIKE '%" . $search_value . "%')"); } } else { if (!empty($search_value)) { $all_projects->join('companies', 'projects.company_id', '=', 'companies.id')->whereRaw("(projects.name LIKE '%" . $search_value . "%' OR companies.bedrijfsnaam LIKE '%" . $search_value . "%')"); } } $recordsTotal = $all_projects->count(); $recordsFiltered = $recordsTotal; if ($num_skip > 0) { $all_projects->skip($num_skip); } $all_projects = $all_projects->take($num_items)->get(); Debugbar::info(count($all_projects)); $data = []; foreach ($all_projects as $project) { // load relations $load_curr_company = $project->company; $curr_company = $project->company !== NULL ? (object) ['id' => $project->company_id, 'bedrijfsnaam' => utf8_encode($project->company->bedrijfsnaam)] : (object) null; $data[] = (object) ['DT_RowId' => 'row_' . $project->id, 'projects' => $project, 'companies' => $curr_company]; } $ret = ['data' => $data, 'recordsTotal' => $recordsTotal, 'recordsFiltered' => $recordsFiltered, 'companies' => $this->getAllCompanies()]; return Response::json($ret); }
public function postNotification($event, $task) { eerror_log('Notification Task ' . json_encode($task)); // get promoters associated through event // $event_promoters = $event->promoters()->whereHas('types', function($q) use ($task) // { // $q->where('taskgroups.id', $task->group_id) // ->orWhere('taskgroups.id', 5); // })->get(); // Debugbar::info($event_promoters); // $this->sendNotification($event_promoters, $event, $task, 'event'); $matching_promoters = []; $event_promoters = $event->promoters()->get(); foreach ($event_promoters as $key => $promoter) { Debugbar::info($promoter->email); $promoter_types = $promoter->types()->get(); foreach ($promoter_types as $key => $eptype) { Debugbar::info($eptype->id, $task->group_id, (int) $eptype->id === (int) $task->group_id || (int) $eptype->id === 5); if ((int) $eptype->id === (int) $task->group_id || (int) $eptype->id === 5) { $matching_promoters[] = $promoter; } } } $this->sendNotification($matching_promoters, $event, $task, 'event'); // get promoters associated through company $all_event_companies = Company::selectRaw('companies.*, events_companies_xref.event_id, events_companies_xref.company_id')->join('events_companies_xref', 'companies.id', '=', 'events_companies_xref.company_id')->where('events_companies_xref.event_id', (int) $event->id)->where('companies.type', 'Promotor')->get(); foreach ($all_event_companies as $company_key => $company) { $matching_cpromoters = []; $company_promoters = $company->promoters()->get(); foreach ($company_promoters as $key => $cpromoter) { $cpromoter_types = $cpromoter->types()->get(); foreach ($cpromoter_types as $key => $cptype) { Debugbar::info($cptype->id, $task->group_id, (int) $cptype->id === (int) $task->group_id || (int) $cptype->id === 5); if ((int) $cptype->id === (int) $task->group_id || (int) $cptype->id === 5) { $matching_cpromoters[] = $cpromoter; } } } $this->sendNotification($matching_cpromoters, $event, $task, 'company'); } return Response::make('Email sent', 200); }
/** * Display the specified resource. * GET /cautas/{id} * * @param int $id * @return Response */ public function show() { $where = ""; $query = "\n\t\t\tSELECT \n\t\t\timobile.id,\n\t\t\timobile.pret_vanzare_euro,\n\t\t\timobile.dotari,\n\t\t\timobile.valabilitate_oferta, \n\t\t\tlocalitati.denumire as localitate,\n\t\t\tjudete.denumire as judet,\n\t\t\tcartier.denumire as cartier,\n\t\t\ttip_nr_camere.nr_camere as nr_camere,\n\t\t\ttip_etaj.denumire as tip_etaj,\n\t\t\ttip_compartiment.denumire as tip_compartiment,\n\t\t\ttip_finisaje_interne.denumire as finisaje_interne\n\t\t\tFROM \n\t\t\timobile LEFT JOIN localitati\n\t\t\tON imobile.localitate_id = localitati.id\n\t\t\tLEFT JOIN judete\n\t\t\tON imobile.judet_id = judete.id\n\t\t\tLEFT JOIN cartier\n\t\t\tON imobile.cartier_id = cartier.id\n\t\t\tLEFT JOIN tip_nr_camere\n\t\t\tON imobile.nr_camere = tip_nr_camere.id\n\t\t\tLEFT JOIN tip_etaj\n\t\t\tON imobile.etaj_apartament = tip_etaj.id\n\t\t\tLEFT JOIN tip_compartiment\n\t\t\tON imobile.compartiment_apartament = tip_compartiment.id\n\t\t\tLEFT JOIN tip_finisaje_interne\n\t\t\tON imobile.finisaje_interioare = tip_finisaje_interne.id\n\t\t\tLEFT JOIN tip_cladire\n\t\t\tON imobile.tip_cladire = tip_cladire.id\n\t\t\tWHERE\n\t\t"; $valabilitatea = Input::has('valabilitate_oferta') ? 1 : 0; $where .= " imobile.valabilitate_oferta = " . $valabilitatea; $cartier_id = Input::get('cartier_id') ? Input::get('cartier_id') : -1; if ($cartier_id > -1) { $where .= " AND imobile.cartier_id = " . $cartier_id; } if (Input::get('strada_cladire') != NULL) { $where .= " AND imobile.strada_cladire LIKE '%" . Input::get('strada_cladire') . "%'"; } if (Input::get('nr_camere') != NULL) { $where .= " AND tip_nr_camere.nr_camere LIKE '%" . Input::get('nr_camere') . "%'"; } if (Input::get('pret_vanzare_min') != NULL && Input::get('pret_vanzare_max') != NULL) { $where .= " AND imobile.pret_vanzare_euro >= " . Input::get('pret_vanzare_min') . " AND imobile.pret_vanzare_euro <= " . Input::get('pret_vanzare_max'); } else { if (Input::get('pret_vanzare_min') != NULL) { $where .= " AND imobile.pret_vanzare_euro >= " . Input::get('pret_vanzare_min'); } else { if (Input::get('pret_vanzare_max') != NULL) { $where .= " AND imobile.pret_vanzare_euro <= " . Input::get('pret_vanzare_max'); } } } if (Input::get('tip_cladire') != NULL) { $where .= " AND imobile.tip_cladire LIKE '%" . Input::get('tip_cladire') . "%'"; } Debugbar::info(Input::all()); $query .= $where; Debugbar::info($query); $imobils = DB::select(DB::raw($query)); Debugbar::info($imobils); if (Request::ajax()) { return $imobils; } }
}); // Login and register # Show login form Route::get('/login', 'Auth\\AuthController@getLogin'); # Process login form Route::post('/login', 'Auth\\AuthController@postLogin'); # Process logout Route::get('/logout', 'Auth\\AuthController@getLogout'); # Show registration form Route::get('/register', 'Auth\\AuthController@getRegister'); # Process registration form Route::post('/register', 'Auth\\AuthController@postRegister'); // Debugging Route::get('/practice', function () { $data = array('foo' => 'bar'); Debugbar::info($data); Debugbar::error('Error!'); Debugbar::warning('Watch out…'); Debugbar::addMessage('Another message', 'mylabel'); return 'Practice'; }); Route::get('/confirm-login-worked', function () { # You may access the authenticated user via the Auth facade $user = Auth::user(); if ($user) { echo 'You are logged in.'; dump($user->toArray()); } else { echo 'You are not logged in.'; } return;
<?php return array('enabled' => function () { $enabled = false; if (Session::get('debug') == true) { $enabled = true; // GROUP TYPE Debugbar::info(Auth::user()->active_contact->group_type->name); // GROUP Debugbar::info(Auth::user()->active_contact->group->name); // ROLES foreach (Auth::user()->active_contact->group->roles as $role) { $permissions = []; foreach ($role->permissions as $permission) { $permissions[] = $permission->name; } Debugbar::info(implode(" | ", $permissions)); } } return $enabled; }, 'storage' => array('enabled' => true, 'driver' => 'file', 'path' => storage_path('debugbar'), 'connection' => null, 'provider' => ''), 'include_vendors' => true, 'capture_ajax' => true, 'clockwork' => false, 'collectors' => array('phpinfo' => true, 'messages' => true, 'time' => true, 'memory' => true, 'exceptions' => true, 'log' => true, 'db' => true, 'views' => true, 'route' => true, 'laravel' => false, 'events' => false, 'default_request' => false, 'symfony_request' => true, 'mail' => true, 'logs' => false, 'files' => false, 'config' => false, 'auth' => false, 'gate' => false, 'session' => true), 'options' => array('auth' => array('show_name' => false), 'db' => array('with_params' => true, 'timeline' => false, 'backtrace' => false, 'explain' => array('enabled' => false, 'types' => array('SELECT')), 'hints' => true), 'mail' => array('full_log' => false), 'views' => array('data' => false), 'route' => array('label' => true), 'logs' => array('file' => null)), 'inject' => true, 'route_prefix' => '_debugbar');
public function widget($what) { \Debugbar::info('HomeController::widget(' . $what . ')'); switch ($what) { case 'providers': return $this->makeWidgetProviders(); } $msg = 'Invalid widget request (' . $what . ')'; return $msg; }
/** * Obtiene todas las horas Libres y Reservadas asi como también solo las Libres * * @param $arrayAsignadas * @return array */ protected function obtenerTodasHoras($arrayAsignadas) { /** * @var $array_horas Esta contiene las horas libres/disponibles */ $array_horas = Hora::whereNotIn('id', $arrayAsignadas)->select(['id', 'hora', DB::raw('0 as active')]); // 0 es Libre /** * @var $array_asignadas Esta contiene solo las horas reservadas */ $array_asignadas = Hora::whereIn('id', $arrayAsignadas)->select(['id', 'hora', DB::raw('1 as active')]); // 1 es Reservada /** * @var $disponibles Contiene todas las horas disponibles listas para mostrarlas en la vista */ $disponibles = $array_horas->get()->toArray(); /** * @var $all Esta contiene las horas asignadas y no asignadas */ $all = $array_horas->unionAll($array_asignadas)->orderBy('id', 'asc')->get()->toArray(); \Debugbar::info($all); return array('todas' => $all, 'disponibles' => $disponibles); }
<?php /* Debugbar::info(Paoloumali\Options\Option::all()); Debugbar::info(Paoloumali\Options\Option::all()->toArray()); Debugbar::info(Paoloumali\Options\Option::all()->lists('key')); */ Debugbar::info(App::make('OptionRepo')); Debugbar::info(app('opt.model')); Debugbar::info(App::make('OptionModel')); Debugbar::info(app('opt.model') == App::make('OptionModel')); Route::get('opt', function () { return View::make('opt::hello'); }); Route::get('getSettings', 'OptionsApiController@index'); Route::controller('settings', 'OptionsWebController'); // for ajax Route::resource('option', 'OptionsHttpController'); Route::resource('options', 'OptionsApiController');