Viewing Relational Data

Hello Team,

Controller:

$restaurant = DfRestaurants::find()

     ->select('df_restaurant_name,df_price,df_restaurants.df_restaurant_id')


     ->leftJoin('df_restaurant_menu', '`df_restaurants`.`df_restaurant_id` = `df_restaurant_menu`.`df_restaurant_id`')


     ->where(['df_restaurant_menu.df_today_special' => 'yes'])


     ->with('dfRestaurantMenus')


     ->all();

View:

     <?= $restaurants->dfRestaurantMenus[0] -> df_price ?>

The above works, isn’t there a better way to access the price from restaurant_menu table?