app/Http/Controllers/SpaController.php
/**
     * 
     * @param string $day date day value
     * @param string $request post value
     * @return boolean
     */
@param string $day date day value
@param string $request post value
@return boolean
@param string $day date day value @param string $request post value @return boolean
private function _is_add_to_array($day, $request) 
    {
        if (isset($request->chk_day['all']) && $request->chk_day['all'] == 'all') {
            return true;
        }
        if (isset($request->chk_day)) {
            $day = strtolower($day);
            $arrDay = $request->chk_day;
            if (isset($request->chk_day['weekends']) && $request->chk_day['weekends'] != 'false') {
                  $arrDay = array('saturday', 'sunday');
            }
            if (isset($request->chk_day['weekdays']) && $request->chk_day['weekdays'] != 'false') {
                  $arrDay = array('monday', 'tuesday', 'wednesday', 'thursday', 'friday');
            }
            if (in_array($day, $arrDay)) {
                return true;
            }            
        }
        return false;
    }
private function _is_add_to_array ( $ day , $ request ) { if ( isset ( $ request -> chk_day [ 'all' ] ) && $ request -> chk_day [ 'all' ] == 'all' ) { return true ; } if ( isset ( $ request -> chk_day ) ) { $ day = strtolower ( $ day ) ; $ arrDay = $ request -> chk_day ; if ( isset ( $ request -> chk_day [ 'weekends' ] ) && $ request -> chk_day [ 'weekends' ] != 'false' ) { $ arrDay = array ( 'saturday' , 'sunday' ) ; } if ( isset ( $ request -> chk_day [ 'weekdays' ] ) && $ request -> chk_day [ 'weekdays' ] != 'false' ) { $ arrDay = array ( 'monday' , 'tuesday' , 'wednesday' , 'thursday' , 'friday' ) ; } if ( in_array ( $ day , $ arrDay ) ) { return true ; } } return false ; }
@param string $day date day value
 @param string $request post value
 @return boolean
@param string $day date day value @param string $request post value @return boolean