/** * Function for update a blog article. */ public function create() { $pagecode = 'jeSu7UYVbVM6S0IF'; $meta = Meta::where('code', $pagecode)->firstOrFail(); $catergories = ArticleCategory::select('id', 'name')->get()->pluck('id', 'name')->flip(); return view('core.article.create', compact('catergories', 'meta')); }
public function create() { $perfis = ['-1' => 'Selecione o perfil'] + PerfilUsuario::orderBy('tipo', 'asc')->lists('tipo', 'id')->all(); $planos = ['-1' => 'Selecione o plano'] + Plano::orderBy('nome', 'asc')->lists('nome', 'id')->all(); $tiposVendedores = ['-1' => 'Selecione o tipo de vendedor'] + TipoVendedor::orderBy('tipo', 'asc')->lists('tipo', 'id')->all(); $metas = ['-1' => 'Selecione a meta'] + Meta::orderBy('numeroEmpresas', 'asc')->lists('numeroEmpresas', 'id')->all(); return View('Usuario.create')->with('perfis', $perfis)->with('planos', $planos)->with('tiposVendedores', $tiposVendedores)->with('metas', $metas); }
/** * Bootstrap the application services. * * @return void */ public function boot() { View::composer('partials.meta', function ($view) { $meta = null; if ($view->post) { $postId = $view->post->id; $meta = Meta::where('post_id', '=', $postId)->first(); } if (!$meta) { $meta = json_decode(json_encode($this->defaultMeta), FALSE); } $view->with('meta', $meta); }); }
public function create() { $usuarios = \App\Usuario::all(); $usuariosSelect = array(); foreach ($usuarios as $usuario) { $usuariosSelect[$usuario->Id] = $usuario->Nome; } $tipos = \App\TipoVendedor::all(); $tiposSelect = array(); foreach ($tipos as $tipo) { $tiposSelect[$tipo->Id] = $tipo->Tipo; } $metas = \App\Meta::all(); $metasSelect = array(); foreach ($metas as $meta) { $metasSelect[$meta->Id] = $meta->NumeroEmpresas; } return View('Vendedor.create')->with('usuarios', $usuariosSelect)->with('tipos', $tiposSelect)->with('metas', $metasSelect); }
public function adicionarMeta($id) { $vendedor = Vendedor::where('idUsuario', '=', $id)->first(); $metas = ['-1' => 'Selecione a meta'] + Meta::lists('nome', 'id')->all(); return view('Vendedor.VincularMetaAdicionar')->with("vendedor", $vendedor)->with("metas", $metas); }
Route::get('about', 'PagesController@about'); Route::get('contact', 'PagesController@contact'); Route::post('contact', 'PagesController@contactPost'); Route::get('projects', 'PagesController@projects'); Route::get('dashboard', 'PagesController@dashboard'); Route::get('blog/category', function () { return redirect('blog'); }); Route::get('blog/category/{slug}', function ($slug) { $category = ArticleCategory::where('name', $slug)->first(); if (is_null($category)) { return redirect('blog'); } $articles = Article::where('category', $category->id)->published()->listing()->paginate(4); $pagecode = '8PWLY8FGtvp2nQ5D'; $meta = Meta::where('code', $pagecode)->firstOrFail(); return view('core.article.index', compact('articles', 'meta')); }); /** * Blog or Article Requests. */ Route::resource('blog', 'BlogController'); /** * User Authentication, Registation & Profiles Requests. */ Route::get('login', 'Auth\\AuthController@getLogin'); Route::post('login', 'Auth\\AuthController@postLogin'); Route::get('logout', 'Auth\\AuthController@getLogout'); Route::get('register', 'Auth\\AuthController@getRegister'); Route::post('register', 'Auth\\AuthController@postRegister'); /**
public function update(Request $request, $id) { $tstamp = Carbon::now(-6); $meta_id = $id; $isactive = $request->input('isactive'); if (is_null($isactive)) { $isactive = 1; } $eie = $request->input('eie'); if (is_null($eie)) { $eie = 0; } if (Auth::check()) { $staff_id = Auth::user()->id; //$sfname = Auth::user()->fname; //$slname = Auth::user()->lname; } else { return redirect('auth/login'); } $meta = Meta::find($meta_id); if (is_null($meta)) { redirect()->back()->with('status', 'Could not locate record'); } $meta->staff_id = $staff_id; $meta->metakey = $request->input('metakey'); $meta->metavalue = $request->input('metavalue'); $meta->ordr = $request->input('ordr'); $meta->description = $request->input('description'); $meta->isactive = $isactive; $meta->eie = $eie; $meta->datedoc = $tstamp; $meta->save(); return redirect('meta')->with('status', 'Created meta'); }
public function metaValorAll() { $metas_diario = Meta::where("tipo", "valor_diaria")->get(); $metas_mensal = Meta::where("tipo", "valor_mensal")->get(); $metas = ['metas_diario' => $metas_diario, 'metas_mensal' => $metas_mensal]; return response()->json($metas); }
public function postkeyword(Request $request) { $kata = $request->input('kata'); $alias = $request->input('alias'); $meta = new Meta(); $meta->kata = $kata; $meta->alias = $alias; $meta->save(); return redirect('keyword'); }
/** * Remove the specified resource from storage. * * @param int $id * @return Response */ public function destroy($id) { $meta_subPrograma = Meta::find($id)->meta_sub_programa($id); $meta_Programa = Meta::find($id)->meta_programa($id); if (is_object($meta_subPrograma)) { $delete_metaSubprogram = MetaSubProgramas::find($meta_subPrograma->id)->delete(); } if (is_object($meta_Programa)) { $delete_metaSubprogram = MetaProgramas::find($meta_Programa->id)->delete(); } $post = Meta::find($id)->delete(); return \Redirect::route('plan_desarrollo')->with('alert', 'Registro eliminado con exito!'); }
public function store(Request $request) { \App\Meta::create(['NumeroEmpresas' => $request['numeroEmpresas']]); return "Meta Registrada com sucesso!!"; }
public function equipe() { $metas = Meta::where('tipoEmpresa', 'Equipe')->orderBy('numeroEmpresas', 'asc'); return view('Meta.Equipe')->with('metas', $metas); }
/** * Function for clients . * Using */ public function dashboard() { $pagecode = '1o3wTvPBraUILjQZ'; $meta = Meta::where('code', $pagecode)->firstOrFail(); if (Auth::check()) { return Redirect::to('/'); return view('core.standard', compact('meta')); } else { return Redirect::to('login'); } }
public function update(Request $request, $id) { $datedoc = Carbon::now(-6); $admission = Admission::find($id); if (is_null($admission)) { return redirect()->back()->with('status', 'Missing Reference'); } $inquiry_id = $admission->inquiry_id; $client_id = $admission->client_id; $chks = array('eie', 'dss'); foreach ($chks as $chk) { $admission->setAttribute($chk, Input::has($chk) ? true : false); } $program_id = $request->input('program_id'); $status_id = $request->input('status_id'); $dctype_id = $request->input('dctype_id'); if (is_null($dctype_id)) { $dctype_id = 0; $dctype = "--not-applicable--"; } else { $dctyperef = Meta::find($dctype_id); $dctype = $dctyperef->metavalue; } $statusref = Meta::find($status_id); $status = $statusref->metavalue; $serviceref = Service::find($program_id); $program = $serviceref->service; //======================= $morechks = array('eie', 'dss'); foreach ($morechks as $morechk) { $admission->setAttribute($morechk, Input::has($morechk) ? true : false); } $admission->program = $program; $admission->dctype = $dctype; $admission->status = $status; $admission->dateadmission = $request->input('dateadmission'); $admission->program_id = $request->input('program_id'); $admission->status_id = $request->input('status_id'); $admission->datedischarge = $request->input('datedischarge'); $admission->dctype_id = $request->input('dctype_id'); $admission->save(); if ($client_id > 0) { //return redirect()->route('clientview', $client_id); } else { return redirect()->route('inquiryview', $inquiry_id); } }