\App\Http\ControllersCategoryController

Class CategoryController CRUD for category (/admin/categories).

Summary

Methods
Properties
Constants
index()
create()
store()
show()
edit()
update()
destroy()
getAllCategories()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

index()

index() : \Illuminate\Http\Response

Paginated listing of shop categories.

Returns

\Illuminate\Http\Response

create()

create() : \Illuminate\Http\Response

Show the form for creating a new category.

Returns

\Illuminate\Http\Response

store()

store(\App\Http\Requests\CategoryRequest  $request) : \App\Http\Controllers\Response

Store a newly created resource in storage.

Parameters

\App\Http\Requests\CategoryRequest $request

Returns

\App\Http\Controllers\Response

show()

show(integer  $id) : \Illuminate\Http\Response

Display the specified category.

Not required - to be removed.

Parameters

integer $id

category id

Returns

\Illuminate\Http\Response

edit()

edit(integer  $id) : \Illuminate\Http\Response

Show the form for editing the specified category.

Parameters

integer $id

category id

Returns

\Illuminate\Http\Response

update()

update(\App\Http\Requests\CategoryRequest|\Illuminate\Http\Request  $request, integer  $id) : \Redirect

Update the specified resource in storage.

Parameters

\App\Http\Requests\CategoryRequest|\Illuminate\Http\Request $request

update request

integer $id

category id

Returns

\Redirect

destroy()

destroy(\Illuminate\Http\Request  $request, integer  $id) : \Redirect

Remove the specified resource from storage.

Parameters

\Illuminate\Http\Request $request
integer $id

category id

Returns

\Redirect

getAllCategories()

getAllCategories() : \Illuminate\Database\Eloquent\Collection|array<mixed,static>

Return all categories as json object.

Returns

\Illuminate\Database\Eloquent\Collection|array<mixed,static>