PHP Class app\http\controllers\FreeProductsController

Inheritance: extends Controller
Show file Open project: ant-vel/antVel

Public Methods

Method Description
create ( $orderId ) : Response Show the form for creating a new resource.
destroy ( integer $id ) : Response Remove the specified resource from storage.
edit ( integer $id ) : Response Show the form for editing the specified resource.
getParentAndChildren ( [array] $select = ['id', 'description'], [integer] $limit = 5 ) build the free prodcuts tree where parent will be a free product and children are the products list associated.
index ( Illuminate\Http\Request $request ) : Response Display a listing of the resource.
myFreeProducts ( Illuminate\Http\Request $request )
show ( integer $id ) : View Return the product data free query view.
store ( Illuminate\Http\Request $request ) : Response Store a newly created resource in storage.
subscribe ( integer $id ) : Response Subscription free product, validating the conditions and validity of the same.
update ( integer $id ) : Response Update the specified resource in storage.

Method Details

create() public method

Show the form for creating a new resource.
public create ( $orderId ) : Response
return Response

destroy() public method

Remove the specified resource from storage.
public destroy ( integer $id ) : Response
$id integer
return Response

edit() public method

Show the form for editing the specified resource.
public edit ( integer $id ) : Response
$id integer
return Response

getParentAndChildren() public static method

build the free prodcuts tree where parent will be a free product and children are the products list associated.
public static getParentAndChildren ( [array] $select = ['id', 'description'], [integer] $limit = 5 )
$select [array]
$limit [integer]

index() public method

Display a listing of the resource.
public index ( Illuminate\Http\Request $request ) : Response
$request Illuminate\Http\Request
return Response

myFreeProducts() public method

public myFreeProducts ( Illuminate\Http\Request $request )
$request Illuminate\Http\Request

show() public method

Return the product data free query view.
public show ( integer $id ) : View
$id integer of freeproduct
return View

store() public method

Store a newly created resource in storage.
public store ( Illuminate\Http\Request $request ) : Response
$request Illuminate\Http\Request
return Response

subscribe() public method

Subscription free product, validating the conditions and validity of the same.
public subscribe ( integer $id ) : Response
$id integer
return Response

update() public method

Update the specified resource in storage.
public update ( integer $id ) : Response
$id integer
return Response