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()); }
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); } }