コード例 #1
0
 public function testObjectSettersAndGetters()
 {
     $choice = new choice();
     $shell = new Shell('shell');
     $uom = new ProductUom();
     $choice->setShell($shell)->setTargetUom($uom);
     $this->assertSame($shell, $choice->getShell());
     $this->assertSame($uom, $choice->getTargetUom());
 }
コード例 #2
0
ファイル: ChoiceeController.php プロジェクト: alkindi91/DARES
 public function store($qid, Request $req, choice $choice)
 {
     $choice->fill($req->all())->save();
     $message = 'تم اضافة الاجابة بنجاح';
     if (request('submit') == 'save') {
         return redirect()->back()->with('success', $message);
     } else {
         return redirect()->route('choice.index', array('qid' => $qid))->with('success', $message);
     }
 }