Skip to content

Instantly share code, notes, and snippets.

@ellisio
Created February 18, 2015 20:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ellisio/2ff4e9066993e339af03 to your computer and use it in GitHub Desktop.
Save ellisio/2ff4e9066993e339af03 to your computer and use it in GitHub Desktop.
<?php namespace Api\Http\Requests\V3\Action;
use Auth;
use Api\Http\Requests\Request;
/**
* Class ActionStoreRequest
*
* @package Api\Http\Requests\V3\Auth
*/
class ActionStoreRequest extends Request {
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return Auth::check();
}
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules()
{
return [
'type' => 'required|in:RIDE_SHARE,MEETUP',
'title' => 'required',
'destination' => 'required',
'stockImage' => 'required',
'attendeeCount' => 'required|numeric',
'attendeeCountLimited' => 'required',
'dateTime' => 'required|date'
];
}
} // End ActionStoreRequest
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment