app/Http/Controllers/Admin/ClientsController.php
/**
     * Store a newly created Client in storage.
     *
     * @param  \App\Http\Requests\StoreClientsRequest  $request
     * @return \Illuminate\Http\Response
     */
Store a newly created Client in storage.
Store a newly created Client in storage .
public function store(StoreClientsRequest $request)
    {
        if (! Gate::allows('client_create')) {
            return abort(401);
        }
        $client = Client::create($request->all());
        $client->photo()->sync(array_filter((array)$request->input('photo')));
        return redirect()->route('admin.clients.index');
    }
public function store ( StoreClientsRequest $ request ) { if ( ! Gate :: allows ( 'client_create' ) ) { return abort ( 401 ) ; } $ client = Client :: create ( $ request -> all ( ) ) ; $ client -> photo ( ) -> sync ( array_filter ( ( array ) $ request -> input ( 'photo' ) ) ) ; return redirect ( ) -> route ( 'admin.clients.index' ) ; }
Store a newly created Client in storage.
Store a newly created Client in storage .