public static function createPrimaryMenu()
    {
        $check = Menu::where('slug', 'primary')->get()->first();
        if(!$check) {

            $create = factory(Menu::class)->create(
                [
                'title' => 'Primary',
                'slug' => 'primary',
                'isPrimary' => true,
                ]
            );

            if($create) {
                return true;
            }
        }
        return false;
    }
public static function createPrimaryMenu()
    {
        $check = Menu::where('slug', 'primary')->get()->first();
        if(!$check) {

            $create = factory(Menu::class)->create(
                [
                'title' => 'Primary',
                'slug' => 'primary',
                'isPrimary' => true,
                ]
            );

            if($create) {
                return true;
            }
        }
        return false;
    }
public static function createPrimaryMenu ( ) { $ check = Menu :: where ( 'slug' , 'primary' ) -> get ( ) -> first ( ) ; if ( ! $ check ) { $ create = factory ( Menu :: class ) -> create ( [ 'title' => 'Primary' , 'slug' => 'primary' , 'isPrimary' => true , ] ) ; if ( $ create ) { return true ; } } return false ; }
Create primary menu (if it doesn't exist.

@return bool
Create primary menu ( if it doesn t exist .