jeudi 30 août 2018

How insert statement works in open source akaunting script?

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



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2wsIb3T
via IFTTT

Aucun commentaire:

Enregistrer un commentaire