\App\Http\ControllersProductController

Class ProductController.

Summary

Methods
Properties
Constants
index()
updateProductStatus()
create()
store()
show()
edit()
update()
stocks()
updateStock()
destroy()
getPublishedProducts()
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 all products.

Returns

\Illuminate\Http\Response

updateProductStatus()

updateProductStatus(\Illuminate\Http\Request  $request) 

Parameters

\Illuminate\Http\Request $request

create()

create() : \Illuminate\Http\Response

Show the form for creating a new product.

Returns

\Illuminate\Http\Response

store()

store(\App\Http\Requests\ProductRequest  $request) : \Illuminate\Http\Response

Store a newly created product in storage.

Parameters

\App\Http\Requests\ProductRequest $request

Product Request

Returns

\Illuminate\Http\Response

show()

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

Display the specified product.

Parameters

integer $id

page id

Returns

\Illuminate\Http\Response

edit()

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

Show the form for editing the specified product.

Parameters

integer $id

product id

Returns

\Illuminate\Http\Response

update()

update(\Illuminate\Http\Request  $request, integer  $id) : \Illuminate\Support\Facades\Redirect

Update the specified resource in storage.

//TODO: add support for replaces images

Parameters

\Illuminate\Http\Request $request

product request

integer $id

product id

Returns

\Illuminate\Support\Facades\Redirect

stocks()

stocks() 

updateStock()

updateStock(\Illuminate\Http\Request  $request) 

Parameters

\Illuminate\Http\Request $request

destroy()

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

Remove the specified product from storage.

Parameters

integer $id

product id

\Illuminate\Http\Request $request

Returns

\Illuminate\Support\Facades\Redirect

getPublishedProducts()

getPublishedProducts(  $take,   $skip) 

Parameters

$take
$skip