public static function checkBySlug(string $slug)
    {
        if(Language::all()->where('slug', $slug)->count()) {
            return true;
        }
        return false;
    }
public static function checkBySlug(string $slug)
    {
        if(Language::all()->where('slug', $slug)->count()) {
            return true;
        }
        return false;
    }
public static function checkBySlug ( string $ slug ) { if ( Language :: all ( ) -> where ( 'slug' , $ slug ) -> count ( ) ) { return true ; } return false ; }
Checks if language exists by using slug as search.

@param string $slug The slug of the language (ex. en)

@return boolean Returns true if found, false instead
@throws \Exception
Checks if language exists by using slug as search .