public function getList($lang, $pagination)
    {
        // check if user has permissions to access this link
        if(!User::hasAccess('Media', 'read')) {
            return $this->noPermission();
        }
        $list = Pagination::infiniteScrollPagination('media', $pagination, Media::$infinitPaginationShow);
        $results = [
            'list'               => $list,
            'count'              => $list->count(),
            'pagination'         => $pagination,
            'imagesExtensions'   => config('media.image_extensions'),
            'videoExtensions'    => config('media.video_extensions'),
            'videoIconUrl'       => config('media.video_icon_url'),
            'audioExtensions'    => config('media.video_extensions'),
            'audioIconUrl'       => config('media.audio_icon_url'),
            'documentExtensions' => config('media.document_extensions'),
            'documentIconUrl'    => config('media.document_icon_url'),
        ];

        $results['events'] = Event::fire('media:pre_update', [$results]);

        return $results;
    }
public function getList($lang, $pagination)
    {
        // check if user has permissions to access this link
        if(!User::hasAccess('Media', 'read')) {
            return $this->noPermission();
        }
        $list = Pagination::infiniteScrollPagination('media', $pagination, Media::$infinitPaginationShow);
        $results = [
            'list'               => $list,
            'count'              => $list->count(),
            'pagination'         => $pagination,
            'imagesExtensions'   => config('media.image_extensions'),
            'videoExtensions'    => config('media.video_extensions'),
            'videoIconUrl'       => config('media.video_icon_url'),
            'audioExtensions'    => config('media.video_extensions'),
            'audioIconUrl'       => config('media.audio_icon_url'),
            'documentExtensions' => config('media.document_extensions'),
            'documentIconUrl'    => config('media.document_icon_url'),
        ];

        $results['events'] = Event::fire('media:pre_update', [$results]);

        return $results;
    }
public function getList ( $ lang , $ pagination ) { // check if user has permissions to access this link if ( ! User :: hasAccess ( 'Media' , 'read' ) ) { return $ this -> noPermission ( ) ; } $ list = Pagination :: infiniteScrollPagination ( 'media' , $ pagination , Media :: $ infinitPaginationShow ) ; $ results = [ 'list' => $ list , 'count' => $ list -> count ( ) , 'pagination' => $ pagination , 'imagesExtensions' => config ( 'media.image_extensions' ) , 'videoExtensions' => config ( 'media.video_extensions' ) , 'videoIconUrl' => config ( 'media.video_icon_url' ) , 'audioExtensions' => config ( 'media.video_extensions' ) , 'audioIconUrl' => config ( 'media.audio_icon_url' ) , 'documentExtensions' => config ( 'media.document_extensions' ) , 'documentIconUrl' => config ( 'media.document_icon_url' ) , ] ; $ results [ 'events' ] = Event :: fire ( 'media:pre_update' , [ $ results ] ) ; return $ results ; }
Get the list of media files.

@param  string $lang
@param  int    $pagination
@return array
Get the list of media files .