File Manager Lite
Dir:
/home/u540325668/domains/mkjsindia.org/public_html-chash/app/Http/Controllers
Upload
[..]
Admin/
Rename
Del
Auth/
Rename
Del
Author/
Rename
Del
Controller.php (361 B)
Edit
Rename
Del
HomeController.php (651 B)
Edit
Rename
Del
Manager/
Rename
Del
Operator/
Rename
Del
User/
Rename
Del
followController.php (3.57 KB)
Edit
Rename
Del
frontEndController.php (8.05 KB)
Edit
Rename
Del
postmgdController.php (3.33 KB)
Edit
Rename
Del
welcomeController.php (3.67 KB)
Edit
Rename
Del
Edit: welcomeController.php
<?php namespace App\Http\Controllers; use Illuminate\Http\Request; use App\Post; use App\User; use App\Course; use App\Footerlink; use App\Notice; use App\SuccessfulStudent; use App\Slider; use App\Affiliation; use App\Campaign; use App\Setting; use App\Donor; use App\Corporatepartner; use App\Socialmedia; class welcomeController extends Controller { /** * Display a listing of the resource. * * @return \Illuminate\Http\Response */ public function index(Request $request) { $setting = Setting::find(1); // Increment the totalView attribute $setting->totalView++; // Save the updated setting $setting->save(); $user = User::where('role_id', 5)->whereNull('closeType'); $notices = Notice::where('status', 0)->orderBy('id', 'DESC')->get(); $sliders = Slider::where('status', 0)->orderBy('id', 'DESC')->get(); $successfulStudents = SuccessfulStudent::where('status', 0)->get(); $cources = Course::where('status', 0)->get(); $footerLinks = Footerlink::root()->get(); $affiliations = Affiliation::where('status', 0)->get(); $campaigns = Campaign::where('status', 1)->get(); $corporatelinks = Corporatepartner::orderBy('id', 'DESC')->get(); $socialMedias = Socialmedia::where('is_active', 1)->get(); $donors = Donor::where('status', 'Success')->count(); return view('welcome',compact('user', 'cources', 'footerLinks', 'notices', 'successfulStudents', 'sliders', 'affiliations', 'setting', 'campaigns' , 'donors' , 'corporatelinks' , 'socialMedias')); } public function language(Request $request, $id) { session(['languageId' => $id]); $posts = Post::where('publicationStatus', 1)->where('close', 0)->where('language_id', $id)->orderByDesc('id')->paginate(5); $topcategorys = Post::where('language_id', $id)->select('category_id', \DB::raw('COUNT(id) as category10'))->where('language_id', $id)->groupBy('category_id')->orderByDesc('category10')->get(); $languages = Post::select('language_id', \DB::raw('COUNT(id) as language10'))->groupBy('language_id')->orderByDesc('language10')->get(); if ($request->ajax()) { $view = view('user.frontinclude.postForInfo',compact('posts'))->render(); return response()->json(['html'=>$view]); } return view('welcome',compact('posts', 'topcategorys', 'languages')); } /** * Show the form for creating a new resource. * * @return \Illuminate\Http\Response */ public function create() { // } /** * Store a newly created resource in storage. * * @param \Illuminate\Http\Request $request * @return \Illuminate\Http\Response */ public function store(Request $request) { // } /** * Display the specified resource. * * @param int $id * @return \Illuminate\Http\Response */ public function show($id) { // } /** * Show the form for editing the specified resource. * * @param int $id * @return \Illuminate\Http\Response */ public function edit($id) { // } /** * Update the specified resource in storage. * * @param \Illuminate\Http\Request $request * @param int $id * @return \Illuminate\Http\Response */ public function update(Request $request, $id) { // } /** * Remove the specified resource from storage. * * @param int $id * @return \Illuminate\Http\Response */ public function destroy($id) { // } }
Simpan