I have downloaded open source accounting script from akaunting.com. This source code developed in laravel. I am trying to add one more field in items table. But I am not able to find insert statement in this script.
Here is the controller code. After this I am not getting any idea..
public function store(Request $request) {
$item = Item::create($request->input());
// Upload picture
if ($request->file('picture')) {
$media = $this->getMedia($request->file('picture'), 'items');
$item->attachMedia($media, 'picture');
}
$message = trans('messages.success.added', ['type' => trans_choice('general.items', 1)]);
flash($message)->success();
return redirect()->route('items.index');
}
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire