app/Http/Controllers/Backend/BackendPostController.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()
    {
        $posts = $this->postRepository->listPosts();
        return view('backend.posts.index', compact('posts'));
    }
public function index ( ) { $ posts = $ this -> postRepository -> listPosts ( ) ; return view ( 'backend.posts.index' , compact ( 'posts' ) ) ; }
Display a listing of the resource.
Display a listing of the resource .
// Check the role of the user