本文整理汇总了PHP中app\Branch类的典型用法代码示例。如果您正苦于以下问题:PHP Branch类的具体用法?PHP Branch怎么用?PHP Branch使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Branch类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getEdit
public function getEdit($id)
{
$branches = new Branch();
$branchAll = $branches->getBranchesDropDown();
$category = Category::find($id);
return view('ProductCategory.edit', compact('branchAll'))->with('category', $category);
}
示例2: getEdit
public function getEdit($id)
{
$users = User::find($id);
$branches = new Branch();
$branchAll = $branches->getBranchesDropDown();
return view('Users.edit', compact('branchAll'))->with('userdata', $users);
}
示例3: getEdit
public function getEdit($id)
{
$stockInfo = StockInfo::find($id);
$branches = new Branch();
$branchAll = $branches->getBranchesDropDown();
return view('StockInfos.edit', compact('stockInfo'))->with('branchAll', $branchAll);
}
示例4: getCreate
public function getCreate()
{
$branches = new Branch();
$branchAll = $branches->getBranchesDropDown();
$accountCategories = new AccountCategory();
$accountCategoriesAll = $accountCategories->getAccountCategoriesDropDown();
return view('BalanceTransfers.add')->with('branchAll', $branchAll)->with('accountCategoriesAll', $accountCategoriesAll);
}
示例5: getEdit
public function getEdit($id)
{
$account = NameOfAccount::find($id);
$accountCategories = new AccountCategory();
$accountCategoriesAll = $accountCategories->getAccountCategoriesDropDown();
$branches = new Branch();
$branchAll = $branches->getBranchesDropDown();
return view('AccountName.edit', compact('account'))->with('accountCategoriesAll', $accountCategoriesAll)->with('branchAll', $branchAll);
}
示例6: getEdit
public function getEdit($id)
{
$categories = new Category();
$allCategory = $categories->getCategoriesDropDown();
$branches = new Branch();
$branchAll = $branches->getBranchesDropDown();
$subCategory = SubCategory::find($id);
return view('ProductSubCategory.edit', compact('branchAll'))->with('subCategory', $subCategory)->with('categoryAll', $allCategory);
}
示例7: addNew
public static function addNew(Request $request)
{
$branch = new Branch();
$branch->name = $request->input('name');
$branch->phone = $request->input('phone');
$branch->fax = $request->input('fax');
$branch->email = $request->input('email');
$branch->save();
return $branch;
}
示例8: getCreate
public function getCreate()
{
$stockInfos = new StockInfo();
$allStockInfos = $stockInfos->getStockInfoDropDown();
$parties = new Party();
$partyAll = $parties->getPartiesDropDown();
$imports = new Import();
$consignmentAll = $imports->getConsignmentNameDropDown();
$branches = new Branch();
$branchAll = $branches->getBranchesDropDown();
return view('SalesReturn.add', compact('allStockInfos', 'consignmentAll'))->with('branchAll', $branchAll)->with('partyAll', $partyAll);
}
示例9: getStockProducts
public function getStockProducts()
{
$branches = new Branch();
$branchAll = $branches->getBranchesDropDown();
$stockInfos = new StockInfo();
$allStockInfos = $stockInfos->getStockInfoDropDown();
$catogories = new Category();
$categoriesAll = $catogories->getCategoriesDropDown();
$products = new Product();
$productAll = $products->getProductsWithCategories();
return view('Searches.stockProduct', compact('productAll'))->with('categoriesAll', $categoriesAll)->with('allStockInfos', $allStockInfos)->with('branchAll', $branchAll);
}
示例10: getChangeStatus
public function getChangeStatus($status, $id)
{
$branch = Branch::find($id);
if ($branch['status'] == $status) {
$branch->status = $status == 'Activate' ? 'Deactivate' : 'Activate';
$branch->save();
}
return new JsonResponse(array('id' => $branch['id'], 'status' => $branch['status']));
}
示例11: store
/**
* Store a newly created resource in storage.
*
* @return Response
*/
public function store(Request $request)
{
$this->validate($request, ['name' => 'required|max:255', 'mobile' => 'numeric|min:10', 'telephone' => 'numeric']);
$input = $request->all();
$input['company_id'] = Auth::user()->company->id;
$input['account_year_id'] = session('account');
Branch::create($input);
flash()->success('Branch Created Successfully !');
return redirect('branch');
}
示例12: showWaitingRoom
public function showWaitingRoom(Request $request)
{
if ($request->session()->get('global_branch') == 'all') {
$branches = Branch::all();
} else {
$branches[] = Branch::findOrFail($request->session()->get('global_branch'));
}
$vars = array('branches' => $branches);
return view('backend.page.waiting-room')->with($vars);
}
示例13: create
/**
* Show the form for creating a new resource.
*
* @return Response
*/
public function create()
{
$party = $this->party->orderBy('name', 'asc')->lists('name', 'id');
if (Auth::user()->hasRole('admin')) {
$branch = Branch::all()->lists('name', 'id');
} else {
$branch = $this->branch->orderBy('name', 'asc')->lists('name', 'id');
}
return view('godown.create', compact('party', 'branch'));
}
示例14: doAddStockItem
public function doAddStockItem(Request $request)
{
if (count($request->input('branches')) > 0) {
$stock_item = Stock::addNew(["name" => $request->input('name'), "ean" => $request->input('ean'), "low_stock_notification_level" => $request->input('low-stock-number')]);
foreach ($request->input('branches') as $branch_id) {
$branch = Branch::findOrFail($branch_id);
$stock_item->attachToBranch($branch);
}
}
return redirect()->back()->with('stock-item-added', true);
}
示例15: show
/**
* Display the specified resource.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function show($id)
{
//
$company = Company::find($id);
$branches = Branch::where("company_id", "=", $company->id)->get();
$stacks = Invoicingstack::where("company_id", "=", $company->id)->where("status", "=", 0)->get();
$stack2s = Invoicingstack::where("company_id", "=", $company->id)->get();
$invoice = Bill::where("company_id", "=", $company->id)->get();
$invoiceGroup = Bill::where("company_id", "=", $company->id)->groupBy("invoice_date")->get();
return View("company.companydetail", ['invGp' => $invoiceGroup, 'stacks' => $stacks, 'stack2s' => $stack2s, 'invoices' => $invoice, 'company' => $company, 'branches' => $branches, 'title' => 'Company Detail']);
}