</> Code samples - xStreamer

We take great pride in following best practices while coding so that the end result is consistent, descriptive, and easy to interpret.

Hence building on top of the script you purchase from us is easy. You can always customize things yourself or reach out to us and let us bring your vision to life.

Feel free to check out some example code snippets below.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 /** * Font end Login * @param Request $email & $password [description] * @return [respone] [description] */ public function signin(Request $Request) { $current_url = $Request->current_url; $user = MemberModel::where('email', '=', $Request->email) ->where('password', '=', md5($Request->password)) ->first(); if ($user) { if($user->status==0){ return view('login.loginpage')->with('msglogin', trans('home.THIS_ACCOUNT_IS_NOT_ACTIVATED')); } if ($user->status == 3) { return view('login.loginpage')->with('msglogin', trans('home.THIS_ACCOUNT_IS_DEACTIVATE')); } \Session::put("User", $user); MemberModel::setUserOnline($Request->email); //set activity logs $log = new ActivityLogModel(); $log->user_id = $user->id; $log->type = 'login'; $log->object_id = $user->id; $log->description = 'Signin at ' . date('Y-m-d'); $log->save(); if ($user['roles'] == 0 && $user['is_profile_updated'] == 0) { return redirect($current_url); //profile } return redirect($current_url); //index } return view('login.loginpage')->with('msglogin', trans('home.EMAIL_OR_PASSWORD_NOT_MATCH')); }
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 public function get_categories() { $categories = AppHelper::getCategoryList(); $countVideoGroupByCategory = VideoCatModel::select('cat_id', DB::raw('count(*) as total')) ->groupBy('cat_id') ->pluck('total','cat_id'); $recomment_categories = CategoriesModel::where('recomment', '=', 1)->where('status', '=', 1)->take(12)->OrderbyRaw('RAND()')->get(); if ($categories) { return view('categories.index')->with('categories', $categories) ->with('recomment_categories', $recomment_categories) ->with('all_categories', $this->get_all_categories()) ->with('channel_popular', $this->get_channelpopular()) ->with('country_category', $this->get_country_category()) ->with('country', $this->get_country()) ->with('countVideoGroupByCategory', $countVideoGroupByCategory); } }