Esempio n. 1
0
 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     $brand = Brand::all();
     $category = Category::all();
     $user = User::all();
     return view('product.create_new_product', compact('brand', 'category', 'subcat_level1', 'user'));
 }
 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     DB::table('trackings')->truncate();
     $faker = Faker::create();
     foreach (range(1, 20) as $index) {
         Tracking::create(['image_url' => $faker->imageUrl(640, 480, 'city'), 'facing_id' => Facing::find($faker->numberBetween(1, 20))->id]);
     }
     foreach (range(21, 30) as $index) {
         Tracking::create(['image_url' => $faker->imageUrl(640, 480, 'city'), 'state' => 'Inserted', 'inserted_at' => Carbon::now(), 'facing_id' => Facing::all()->get($faker->numberBetween(1, 20))->id, 'product_id' => Product::all()->get($faker->numberBetween(1, 20))->id, 'brand_id' => Brand::all()->get($faker->numberBetween(1, 20))->id, 'user_id' => User::all()->get($faker->numberBetween(1, 10))->id]);
     }
 }
Esempio n. 3
0
 public function createMerchant()
 {
     $merchantObj = new Merchant();
     $indication = "merchant";
     $disabled = 'null';
     $userModel = $merchantObj->getMerchantRelationsFullMeta();
     // dd($userModel);
     $route = route('create-new-user-p');
     $brand_table = Brand::all();
     $isbrand = false;
     return view('user/registerMerchant', compact(['indication', 'route', 'disabled', 'userModel', 'brand_table', 'isbrand']));
 }
Esempio n. 4
0
 public function __construct()
 {
     $this->brands = Brand::all();
     $this->sochoxe = Cars::select('socho_xe')->distinct()->orderBy('socho_xe', 'asc')->get();
     $this->tintucs = TinTuc::select('id', 'tieude', 'noidung')->orderBy('id', 'desc')->take(5)->get();
 }
Esempio n. 5
0
 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function edit($xe_id)
 {
     $data = Cars::where('xe_id', $xe_id)->get()->first();
     $brands = Brand::all();
     $taixedaxepxe = Cars::select('tai_xe_id')->get();
     foreach ($taixedaxepxe as $key => $taixe) {
         if ($taixe->tai_xe_id != null) {
             $taixearray[$key] = $taixe->tai_xe_id;
         }
     }
     $taixehientai = TaiXe::where('taixe_id', $data->tai_xe_id)->get()->first();
     //dd($taixearray);
     $taixe = TaiXe::whereNotIN('taixe_id', $taixearray)->get();
     //dd($taixe);
     return view('backend.cars.suaxe', compact('data', 'taixehientai', 'taixe', 'brands'));
 }
Esempio n. 6
0
 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function edit($id)
 {
     //
     $status = ['0' => 'In-active', '1' => 'Active'];
     $divisions = ItemInventories::getDivisionList();
     $brand = Brand::all()->lists('brand', 'id');
     $data = array();
     $sel_dv = [];
     $sel_cat = [];
     $sel_scat = [];
     $sel_br = [];
     if (!empty($sel_cat)) {
         $data['categories'] = $sel_cat;
     }
     if (!empty($sel_dv)) {
         $data['divisions'] = $sel_dv;
     }
     if (!empty($sel_scat)) {
         $data['sub_categories'] = $sel_scat;
     }
     if (!empty($sel_br)) {
         $data['brands'] = $sel_br;
     }
     $item = Item::findOrFail($id);
     return view('item.edit', ['item' => $item, 'brand' => $brand], compact('sel_dv', 'divisions', 'sel_cat', 'sel_scat', 'sel_br', 'status'));
 }
Esempio n. 7
0
 public function danhmuc()
 {
     $brands = Brand::all();
     return view('backend.brand.list', compact('brands'));
 }