src/Classes/Hook.php
public static function getHighestPosition($id_hook)
    {
        return (int)\DB::table('hooks_modules as hm')->
        leftJoin('hooks as h', 'h.id', '=', 'hm.id_hook')->
        where('h.id',$id_hook)->
        orderBy('hm.position', 'DESC')->value('position');
    }
public static function getHighestPosition($id_hook)
    {
        return (int)\DB::table('hooks_modules as hm')->
        leftJoin('hooks as h', 'h.id', '=', 'hm.id_hook')->
        where('h.id',$id_hook)->
        orderBy('hm.position', 'DESC')->value('position');
    }
public static function getHighestPosition ( $ id_hook ) { return ( int ) \ DB :: table ( 'hooks_modules as hm' ) -> leftJoin ( 'hooks as h' , 'h.id' , '=' , 'hm.id_hook' ) -> where ( 'h.id' , $ id_hook ) -> orderBy ( 'hm.position' , 'DESC' ) -> value ( 'position' ) ; }
get highest position of given hook
@param int $id_hook
@return int
get highest position of given hook