<!-- Left side column. contains the logo and sidebar --> <?php $user = Auth::user(); $plan_name = \Laravel\Cashier\Subscription::where('user_id', $user->id)->get()->first(); if ($plan_name != null) { $plan_name = $plan_name->stripe_plan; } else { $plan_name = null; } ?> <aside class="main-sidebar"> <!-- sidebar: style can be found in sidebar.less --> <section class="sidebar"> <!-- Sidebar user panel --> <div class="user-panel"> <div class="pull-left image"> <img src="{{ asset('/dist/img/user2-160x160.jpg') }}" class="img-circle" alt="User Image"> </div> <div class="pull-left info"> <p>{{ Auth::user()->name }}</p> <a href="#"><i class="fa fa-circle text-success"></i> Online</a> </div> </div> <!-- search form --> <form action="#" method="get" class="sidebar-form"> <div class="input-group"> <input type="text" name="q" class="form-control" placeholder="Search..."> <span class="input-group-btn"> <button type="submit" name="search-btn" id="search-btn" class="btn btn-flat"><i class="fa fa-search"></i></button> </span>
/** * Get the user for the given subscription ID. * * @param string $subscriptionId * @return mixed */ protected function getSubscriptionById($subscriptionId) { return Subscription::where('braintree_id', $subscriptionId)->first(); }