PATH:
home
/
lab2454c
/
sothebry.softkinesis.com
/
backups
/
core
/
app
/
Http
/
Controllers
/
Admin
<?php namespace App\Http\Controllers\Admin; use App\Http\Controllers\Controller; use App\Models\Brand; use Illuminate\Http\Request; class BrandController extends Controller { public function index() { $pageTitle = "Manage Brand"; $emptyMessage = "No data found"; $brands = Brand::latest()->paginate(getPaginate()); return view('admin.brand.index', compact('pageTitle', 'emptyMessage', 'brands')); } public function store(Request $request) { $request->validate(['name' => 'required|max:80']); $brand = new Brand(); $brand->name = $request->name; $brand->status = $request->status ? 1: 0; $brand->save(); $notify[] = ['success', 'Brand has been created']; return back()->withNotify($notify); } public function update(Request $request) { $request->validate([ 'id' => 'required|exists:brands,id', 'name' => 'required|max:80', ]); $brand = Brand::findOrFail($request->id); $brand->name = $request->name; $brand->status = $request->status ? 1: 0; $brand->save(); $notify[] = ['success', 'Brand has been updated']; return back()->withNotify($notify); } }
[-] SubcategoryController.php
[edit]
[-] CategoryController.php
[edit]
[-] FrontendController.php
[edit]
[-] PageBuilderController.php
[edit]
[-] WithdrawalController.php
[edit]
[-] SupportTicketController.php
[edit]
[-] SpecificationController.php
[edit]
[-] AdvertisementController.php
[edit]
[+]
..
[-] HomeImageController.php
[edit]
[-] DepositController.php
[edit]
[-] ProductContentController.php
[edit]
[-] ExtensionController.php
[edit]
[-] MomentContentController.php
[edit]
[-] DynamicPageController.php
[edit]
[-] ManageUsersController.php
[edit]
[-] ReportController.php
[edit]
[-] GatewayController.php
[edit]
[-] EmailTemplateController.php
[edit]
[-] FaqContentController.php
[edit]
[-] OrderController.php
[edit]
[-] BrandController.php
[edit]
[-] ManualGatewayController.php
[edit]
[-] AdminController.php
[edit]
[+]
Auth
[-] LanguageController.php
[edit]
[-] WithdrawMethodController.php
[edit]
[-] FashionNftController.php
[edit]
[-] GeneralSettingController.php
[edit]
[-] ProductController.php
[edit]
[-] SmsTemplateController.php
[edit]