コード例 #1
0
 /**
  * Show the form for creating a new lead
  *
  * @return \Illuminate\Http\Response
  */
 public function create()
 {
     $business_lines = BusinessLine::all();
     $lead_sources = LeadSource::all();
     $lead_statuses = LeadStatus::all();
     $kinds = Kind::all();
     return view('leads.create', compact('business_lines', 'lead_sources', 'lead_statuses', 'kinds'));
 }
コード例 #2
0
ファイル: OrderRepository.php プロジェクト: thuatnt2/QLNV-l5
 public function createStdObject()
 {
     $kinds = Kind::all();
     $categories = Category::all();
     $result = [];
     foreach ($kinds as $key => $kind) {
         $obj = new \stdClass();
         $symbol = [];
         foreach ($categories as $key => $category) {
             $j = new \stdClass();
             $j->symbol = $category->symbol;
             $j->total = 0;
             array_push($symbol, $j);
         }
         $obj->description = $kind->description;
         $obj->symbol = $symbol;
         $obj->total = 0;
         array_push($result, $obj);
     }
     return $result;
 }
コード例 #3
0
 /**
  * Show the form for editing an entity
  *
  * @param  int  $id
  * @return Response
  */
 public function edit($id)
 {
     $entity = Entity::findOrFail($id);
     $kinds = Kind::all();
     return view('entities.edit', compact('entity', 'kinds'));
 }