app/Http/Controllers/Dashboard/Messages.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()
    {
        $moduleName = $this->getNameFromController();
        $messages = Message::paginate(10);
        return view('Dashboard.messages.index' , 
        compact('messages' , 'moduleName' ) );
    }
public function index ( ) { $ moduleName = $ this -> getNameFromController ( ) ; $ messages = Message :: paginate ( 10 ) ; return view ( 'Dashboard.messages.index' , compact ( 'messages' , 'moduleName' ) ) ; }
Display a listing of the resource.
Display a listing of the resource .