Comment Updated On The AttributeController
This commit is contained in:
parent
188efeb4ee
commit
3c26585c05
|
|
@ -2,20 +2,19 @@
|
|||
|
||||
namespace Webkul\Attribute\Http\Controllers;
|
||||
|
||||
use Illuminate\Support\Facades\Event;
|
||||
use Webkul\Attribute\Repositories\AttributeRepository;
|
||||
|
||||
class AttributeController extends Controller
|
||||
{
|
||||
/**
|
||||
* Contains route related configuration
|
||||
* Contains route related configuration.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $_config;
|
||||
|
||||
/**
|
||||
* AttributeRepository object
|
||||
* Attribute repository instance.
|
||||
*
|
||||
* @var \Webkul\Attribute\Repositories\AttributeRepository
|
||||
*/
|
||||
|
|
@ -71,7 +70,7 @@ class AttributeController extends Controller
|
|||
|
||||
$data['is_user_defined'] = 1;
|
||||
|
||||
$attribute = $this->attributeRepository->create($data);
|
||||
$this->attributeRepository->create($data);
|
||||
|
||||
session()->flash('success', trans('admin::app.response.create-success', ['name' => 'Attribute']));
|
||||
|
||||
|
|
@ -118,7 +117,7 @@ class AttributeController extends Controller
|
|||
'type' => 'required',
|
||||
]);
|
||||
|
||||
$attribute = $this->attributeRepository->update(request()->all(), $id);
|
||||
$this->attributeRepository->update(request()->all(), $id);
|
||||
|
||||
session()->flash('success', trans('admin::app.response.update-success', ['name' => 'Attribute']));
|
||||
|
||||
|
|
@ -144,7 +143,7 @@ class AttributeController extends Controller
|
|||
session()->flash('success', trans('admin::app.response.delete-success', ['name' => 'Attribute']));
|
||||
|
||||
return response()->json(['message' => true], 200);
|
||||
} catch(\Exception $e) {
|
||||
} catch (\Exception $e) {
|
||||
session()->flash('error', trans('admin::app.response.delete-failed', ['name' => 'Attribute']));
|
||||
}
|
||||
}
|
||||
|
|
@ -153,7 +152,7 @@ class AttributeController extends Controller
|
|||
}
|
||||
|
||||
/**
|
||||
* Remove the specified resources from database
|
||||
* Remove the specified resources from database.
|
||||
*
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
|
|
|
|||
Loading…
Reference in New Issue