コード例 #1
0
 public function store(Request $request, User $user, ShopManager $shopManager)
 {
     $this->validate($request, ['name' => 'required']);
     $shopManager->createShop($user, $request->only('name'));
     $this->flashSuccess('add');
     return redirect()->route('admin::shops.index');
 }
コード例 #2
0
 public function postForm(Request $request, ShopManager $shopManager)
 {
     return $this->error('暂时不开放');
     $this->validate($request, ['terms' => 'accepted', 'name' => 'required']);
     $shop = $shopManager->createShop($this->user(), $request->all());
     $this->dispatchNow(new StubNewShop($shop));
     $this->getShopReauthLimiter($request)->pass();
     $this->flashSuccess(trans('shop::messages.welcome'));
     return redirect()->route('shop::home', $shop->id);
 }
コード例 #3
0
 public function index()
 {
     $shops = $this->shopManager->getShopRepository()->latest('updated_at')->paginate();
     return view('shop::__admin.shops.index', compact('shops'));
 }