public static function getByIdentifier($id)
    {
        $file = config('filer.hash_routes') ? static::whereHash($id)->first() : static::find($id);

        if (!$file) {
            throw (new ModelNotFoundException)->setModel(static::class);
        }

        return $file;
    }
public static function getByIdentifier($id)
    {
        $file = config('filer.hash_routes') ? static::whereHash($id)->first() : static::find($id);

        if (!$file) {
            throw (new ModelNotFoundException)->setModel(static::class);
        }

        return $file;
    }
public static function getByIdentifier ( $ id ) { $ file = config ( 'filer.hash_routes' ) ? static :: whereHash ( $ id ) -> first ( ) : static :: find ( $ id ) ; if ( ! $ file ) { throw ( new ModelNotFoundException ) -> setModel ( static :: class ) ; } return $ file ; }
Get a model instance using a unique identifier according to filer.hash_routes.

@param  integer  $id
@return LocalFIle
Get a model instance using a unique identifier according to filer . hash_routes .