static function clientsByName() { $clients = Client::orderBy('name')->get(['id', 'name'])->getDictionary(); return array_map(function ($client) { return $client->name; }, $clients); }
public function index() { $clients = Client::orderBy('name', 'ASC')->get(); $debtors = Debtor::orderBy('name', 'ASC')->get(); $relations = Relation::all(); $tariffs = Tariff::all(); return view('relations.index', ['relations' => $relations, 'clients' => $clients, 'tariffs' => $tariffs, 'debtors' => $debtors]); }
/** * Show the form for editing the specified resource. * * @param int $id * @return \Illuminate\Http\Response */ public function edit($id) { $service = Service::findOrFail($id); $currencies = ['hrk' => 'HRK', 'usd' => 'USD', 'eur' => 'EUR']; $clients = Client::orderBy('name')->pluck('name', 'id')->toArray(); $categories = Category::orderBy('name')->pluck('name', 'id')->toArray(); return view('services.edit')->with(compact('service', 'currencies', 'clients', 'categories')); }
public function index() { $deliveries = Delivery::all(); $clients = Client::orderBy('name', 'ASC')->get(); $debtors = Debtor::orderBy('name', 'ASC')->get(); $dateToday = Carbon::now()->format('Y-m-d'); $registries = Delivery::orderBy('registry')->lists('registry', 'registry')->toArray(); return view('delivery.index', ['registries' => $registries, 'deliveries' => $deliveries, 'clients' => $clients, 'debtors' => $debtors, 'dateToday' => $dateToday]); }
/** * Show the application dashboard to the user. * * @return Response */ public function index() { $expensesss = Expense::where('project_id', '=', 0)->first(); $expensess = Expense::where('project_id', '=', 0)->orderBy('paid_on', 'desc')->get(); $clients = Client::orderBy('created_at', 'desc')->get(); $projects = Project::orderBy('created_at', 'desc')->get(); $expenses = Expense::where('project_id', '>', 0)->orderBy('paid_on', 'desc')->get(); $payments = Payment::orderBy('created_at', 'desc')->get(); $hours = Hour::where('amount_paid', '<', 0)->orderBy('day_worked', 'desc')->get(); return view('home', compact('projects', 'expenses', 'payments', 'hours', 'clients', 'expensess', 'expensesss')); }
public function getUpdate($ticketId) { $ticket = \App\Ticket::find($ticketId); $formOptions = []; $clients = \App\Client::orderBy('name', 'ASC')->get(); $formOptions['client'] = \App\Helpers\FormHelper::objectsToKeyValueArray($clients, 'id', 'name'); $formOptions['client'] = ['' => '--Not Assigned To Client--'] + $formOptions['client']; $statuses = \App\Status::orderBy('weight', 'ASC')->get(); $formOptions['statuses'] = \App\Helpers\FormHelper::objectsToKeyValueArray($statuses, 'id', 'name'); $formOptions['priorities'] = array_combine(range(1, 10), range(1, 10)); $users = \App\User::all(); $formOptions['users'] = \App\Helpers\FormHelper::objectsToKeyValueArray($users, 'id', 'email'); return view('ticket.edit', ['ticket' => $ticket, 'formOptions' => $formOptions]); }
/** * Show the report for all things. * * @return [type] */ public function report() { $services = Service::orderBy('month')->orderBy('day')->where('active', 1)->with(['client', 'category'])->get(); $clients = Client::orderBy('name')->whereHas('services', function ($query) { $query->where('active', 1); })->with(['services' => function ($query) { $query->where('active', 1); }])->get(); $categories = Category::orderBy('name')->whereHas('services', function ($query) { $query->where('active', 1); })->with(['services' => function ($query) { $query->where('active', 1); }])->get(); return view('report')->with(compact('services', 'clients', 'categories')); }
public function mealRosterDinner() { $meals = Meal::orderBy('date_fed', 'desc')->first(); $clients = Client::orderBy('lname', 'asc')->get(); if ($meals->date_fed != date('Y-m-d')) { foreach ($clients as $client) { $meals = new Meal(); $meals->date_fed = date('Y-m-d'); $meals->client()->associate($client); $meals->breakfast = 0; $meals->lunch = 0; $meals->dinner = 0; $meals->save(); } } return view('meal.meal_roster_dinner', compact('clients')); }
public function store() { $rules = array('name' => 'required', 'country' => 'required', 'state' => 'required', 'city' => 'required', 'zip' => 'required', 'address' => 'required', 'contact' => 'required', 'phone' => 'required', 'email' => 'required|email', 'website' => 'url'); $validator = Validator::make(Request::all(), $rules); if ($validator->passes()) { $store = new Client(); $store->fill(Request::all()); $store->save(); // Reload Table Data $data_client = array('client' => Client::orderBy('id', 'desc')->get(), 'refresh' => true); return view('clients.table')->with($data_client); } else { if (Request::ajax()) { return view('clients.create')->withErrors($validator)->withInput(Request::all()); } return 0; } }
function allAppointment() { if (isset($_SESSION['authorization'])) { if ($_SESSION['authorization'] == 1) { $clients = Client::orderBy('id', 'DESC')->get(); } else { $clients = Client::where('doctor_id', $_SESSION['user_id'])->orderBy('id', 'DESC')->get(); } return view('clients.allAppointment', ['clients' => $clients]); } else { //$_SESSION['mesaj'] = '<div class="form-signin" style="background-color:pink;"><center><p style="color:red;">Bu Sayfaya Girme Yetkiniz Yok .</p></center></div>'; return Redirect::to('./sayfa-bulunamadi'); } }
/** * Display a listing of the resource. * * @return Response */ public function index() { return view('client.index', ['clients' => Client::orderBy('name')->get()]); }
/** * @param $stdate * @param $edate * @return array */ public function mealsTotal($stdate, $edate) { $clients = Client::orderBy('lname', 'asc')->get(); $mealTotal = array(); for ($i = 1; $i <= 31; $i++) { $dayTotal[$i] = 0; } foreach ($clients as $client) { $id = $client->id; $mealTotal[$id] = 0; $rowMeals[$id] = $client->meal()->where('date_fed', '>=', $stdate)->where('date_fed', '<', $edate)->get()->toArray(); foreach ($rowMeals[$id] as $row) { $b = $row['breakfast']; $l = $row['lunch']; $d = $row['dinner']; $mealTotal[$id] += $b + $l + $d; } } return $mealTotal; }
/** * Display a listing of the resource. * * @return Response */ public function index() { $client = Client::orderBy('updated_at', 'desc')->paginate(50); return view('admin.client.index', compact('client')); }
public function __construct() { $clients = Client::orderBy('name')->lists('name', 'id'); view()->share(['clients' => $clients]); }
public function getIndex() { $clients = \App\Client::orderBy('name', 'ASC')->get(); return view('client.index', ['clients' => $clients]); }
/** * Show the form for editing the specified resource. * * @param int $id * @return Response */ public function edit($id) { if (!($project = Project::find($id))) { return redirect()->action('ProjectController@index'); } # Infer project rate if (!empty($project->amount) && empty($project->rate) && $project->hours > 0) { $project->rate_inferred = format_number($project->amount / $project->hours); } return view('project.edit', ['clients' => Client::orderBy('name')->lists('name', 'id'), 'project' => $project]); }
/** * Display a listing of the resource. * * @return \Illuminate\Http\Response */ public function index() { $Clients = Client::orderBy('created_at', 'asc')->paginate(5); return view('client.list', ['Clients' => $Clients]); }
/** * Display a listing of the resource. * * @return \Illuminate\Http\Response */ public function index() { $clients = Client::orderBy('name')->get(); return view('clients.index')->with(compact('clients')); }
/** * this is the client roster connection */ public function roster() { $clients = Client::orderBy('lastName', 'asc')->get(); return view('clients.roster', compact('clients')); }
/* |-------------------------------------------------------------------------- | Application Routes |-------------------------------------------------------------------------- | | Here is where you can register all of the routes for an application. | It's a breeze. Simply tell Laravel the URIs it should respond to | and give it the controller to call when that URI is requested. | */ use App\Client; use App\Series; Route::get('/', ['middleware' => 'auth', function () { return redirect('/dashboard'); }]); Route::get('/dashboard', ['middleware' => 'auth', function () { $clients = Client::orderBy('name', 'ASC')->get(); $series = Series::all(); return view('dashboard', compact('clients', 'series')); }]); Route::resource('client', 'ClientController'); Route::resource('series', 'SeriesController'); /* * TODO: Add user roles and enable admins to register new users */ Route::get('/auth/register', function () { return 'Registering new users is not allowed.'; }); Route::controllers(['auth' => 'Auth\\AuthController', 'password' => 'Auth\\PasswordController']); Route::get('/bar', 'ClientController@checkAccess');
/** * Display a listing of the resource. * * @return \Illuminate\Http\Response */ public function index() { $data = ['title' => 'Teleaus | Home', 'sliders' => Slider::orderBy('created_at', 'desc')->get(), 'clients' => Client::orderBy('created_at', 'desc')->get(), 'portfolios' => Portfolio::orderBy('created_at', 'desc')->get(), 'about' => Page::where('slug', 'about-us')->first()]; return view('home')->with($data); }
public function getClientList() { return Client::orderBy('name')->get(); }
/** * Display a listing of the resource. * * @return Response */ public function index() { return Client::orderBy('id')->with(['images', 'attributes'])->paginate(); }