PHP 클래스 App\Http\Controllers\ProductsController

상속: extends Controller
파일 보기 프로젝트 열기: ant-vel/antVel 1 사용 예제들

공개 메소드들

메소드 설명
changeStatus ( integer $id ) : Response Change status a Product.
create ( ) : Response Show the form for creating a new resource.
deleteImg ( Illuminate\Http\Request $request ) : string delete image file.
destroy ( integer $id ) : Response Remove the specified resource from storage.
downloadExample ( ) : string dowload file txt example.
edit ( integer $id ) : Response Show the form for editing the specified resource.
getFeatures ( array $data = [] ) : [type] getFeatures Allows consulting products features. It can return either a required feature or a full array.
getRandCategoryId ( ) : [integer] To get a existing category id from products.
getSuggestions ( $data ) : [array] To get the products suggestion, taking in account either the preference key, such as (product_viewed, product_purchased, product_shared, product_categories, my_searches), or all of them.
getTagsCategories ( $tags = [] ) : [array] Get the category id from tags array.
getTopRated ( [integer] $point = '5', [integer] $limit = 5, [boolean] $tags = false ) : [array This method is able to return the higher rate product list, everything will depends of $point parameter.
index ( Illuminate\Http\Request $request ) : Response Display a listing of the resource.
myProducts ( Illuminate\Http\Request $request )
searchAll ( Illuminate\Http\Request $request ) : [type] [Search products in auto complete fields].
setCounters ( [object] $product = null, [array] $data = [], [string] $wrapper = '' ) Increase the product counters.
show ( integer $id ) : Response Display the specified resource.
store ( Illuminate\Http\Request $request ) : Response Store a newly created resource in storage.
update ( integer $id, Illuminate\Http\Request $request ) : Response Update the specified resource in storage.
upload ( Illuminate\Http\Request $request ) : string upload image file.
upload_key ( Illuminate\Http\Request $request ) : string upload the keys file in txt format.
upload_software ( Illuminate\Http\Request $request ) : string upload the software file in txt format.

비공개 메소드들

메소드 설명
rulesByTypes ( $request, $edit = false )
validateFeatures ( [array] $data ) : [string | array] validate product feature, as specified in the table of product details.
validationMessagesFeatures ( [string] $rules, [string] $index, [string] $name ) : [array] create the error message by taking the name feature, and validation rules.

메소드 상세

changeStatus() 공개 메소드

Change status a Product.
public changeStatus ( integer $id ) : Response
$id integer
리턴 Response

create() 공개 메소드

Show the form for creating a new resource.
public create ( ) : Response
리턴 Response

deleteImg() 공개 메소드

@param Resquest file to upload
public deleteImg ( Illuminate\Http\Request $request ) : string
$request Illuminate\Http\Request
리턴 string

destroy() 공개 메소드

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

downloadExample() 공개 메소드

@param Resquest file to upload
public downloadExample ( ) : string
리턴 string

edit() 공개 메소드

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

getFeatures() 공개 메소드

getFeatures Allows consulting products features. It can return either a required feature or a full array.
public getFeatures ( array $data = [] ) : [type]
$data array function setting
리턴 [type]

getRandCategoryId() 공개 정적인 메소드

To get a existing category id from products.
public static getRandCategoryId ( ) : [integer]
리턴 [integer]

getSuggestions() 공개 정적인 메소드

To get the products suggestion, taking in account either the preference key, such as (product_viewed, product_purchased, product_shared, product_categories, my_searches), or all of them.
public static getSuggestions ( $data ) : [array]
리턴 [array]

getTagsCategories() 공개 정적인 메소드

Get the category id from tags array.
public static getTagsCategories ( $tags = [] ) : [array]
리턴 [array]

getTopRated() 공개 정적인 메소드

This method is able to return the higher rate product list, everything will depends of $point parameter.
public static getTopRated ( [integer] $point = '5', [integer] $limit = 5, [boolean] $tags = false ) : [array
$point [integer]
$limit [integer]
$tags [boolean]
리턴 [array

index() 공개 메소드

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

myProducts() 공개 메소드

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

searchAll() 공개 메소드

[Search products in auto complete fields].
public searchAll ( Illuminate\Http\Request $request ) : [type]
$request Illuminate\Http\Request [Request laravel]
리턴 [type]

setCounters() 공개 정적인 메소드

Increase the product counters.
public static setCounters ( [object] $product = null, [array] $data = [], [string] $wrapper = '' )
$product [object]
$data [array]
$wrapper [string]

show() 공개 메소드

Display the specified resource.
public show ( integer $id ) : Response
$id integer
리턴 Response

store() 공개 메소드

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

update() 공개 메소드

Update the specified resource in storage.
public update ( integer $id, Illuminate\Http\Request $request ) : Response
$id integer
$request Illuminate\Http\Request
리턴 Response

upload() 공개 메소드

@param Resquest file to upload
public upload ( Illuminate\Http\Request $request ) : string
$request Illuminate\Http\Request
리턴 string

upload_key() 공개 메소드

@param Resquest file to upload
public upload_key ( Illuminate\Http\Request $request ) : string
$request Illuminate\Http\Request
리턴 string

upload_software() 공개 메소드

@param Resquest file to upload
public upload_software ( Illuminate\Http\Request $request ) : string
$request Illuminate\Http\Request
리턴 string