app/Http/Controllers/NewsController.php
/**
	 * Display a listing of the resource.
	 *
	 * @return Response
	 */
Display a listing of the resource.
@return Response
Display a listing of the resource . @return Response
public function index()
	{
		$news = array();
		if(session()->has('email')){
	  		$email = session()->get('email');
		}
		else{
		}
		if(isset($_GET['info']))
			return view('welcome', ['list' => $news, 'info' => $_GET['info'] ]);
		if(isset($_GET['message']))
			return view('welcome', ['list' => $news, 'message' => $_GET['message'] ]);
		else
			return view('welcome', ['list' => $news]);	
	}
public function index ( ) { $ news = array ( ) ; if ( session ( ) -> has ( 'email' ) ) { $ email = session ( ) -> get ( 'email' ) ; } else { } if ( isset ( $ _GET [ 'info' ] ) ) return view ( 'welcome' , [ 'list' => $ news , 'info' => $ _GET [ 'info' ] ] ) ; if ( isset ( $ _GET [ 'message' ] ) ) return view ( 'welcome' , [ 'list' => $ news , 'message' => $ _GET [ 'message' ] ] ) ; else return view ( 'welcome' , [ 'list' => $ news ] ) ; }
Display a listing of the resource.
Display a listing of the resource .
//$news    = \App\News::where('reporter_email' , $email)->orderBy('created_at', 'desc')->limit(10)->get(); //$news    = \App\News::orderBy('created_at', 'desc')->limit(10)->get();