app/Http/Controllers/PostController.php
/**
     * Display a listing of the resource.
     *
     * @return \Illuminate\Http\Response
     */
Display a listing of the resource.
@return \Illuminate\Http\Response
Display a listing of the resource . @return \ Illuminate \ Http \ Response
public function index()
    {
        $video_data = Post::where('post_type', 1)->get();
        $image_data = Post::where('post_type', 2)->get();
        return view('Backend.Post.view_post', [
            'video_data' => $video_data,
            'image_data' => $image_data,
        ]);
    }
public function index ( ) { $ video_data = Post :: where ( 'post_type' , 1 ) -> get ( ) ; $ image_data = Post :: where ( 'post_type' , 2 ) -> get ( ) ; return view ( 'Backend.Post.view_post' , [ 'video_data' => $ video_data , 'image_data' => $ image_data , ] ) ; }
Display a listing of the resource.
Display a listing of the resource .