Пример #1
0
 /**
  * Store a newly created resource in storage.
  *
  * @return Response
  */
 public function store()
 {
     $days = new day();
     $days->day = Input::get('day');
     $days->save();
     Session::flash('message', 'You have successfully added day');
     return Redirect::to('dashboard/admin/days');
 }
Пример #2
0
<div class="container">
    <div class="row">
        <div class="col-md-3">
            <h2 class="page-header">Calendar</h2>
            <div class="brand">
                <img src="images/calenderimg.png">
            </div>
                    <div class="input-group">
                        <input type="date" class="form-control" placeholder="yyyy/mm/dd">
                      <span class="input-group-btn">
                        <button class="btn btn-default" type="button">Go!</button>
                      </span>
                    </div><!-- /input-group -->
        </div>


        <div class="col-md-8 text-center">
            <?php 
require 'DayPicker.php';
$cc = new day(28, 03, 2014);
$cc->viewCal();
?>
        </div>

        <div class="col-md-1"></div>
    </div>
</div>

</body>
</html>
Пример #3
0
  public static function factory($days_str) {
    $limits = explode('-', $days_str);
    $days = array();
    $init = $limits[0];
    $final = $limits[1];
    $current = new day($init);

    $days[] = $current;
    
    while($current->abbrev() != $final) {
      $current = $current->next(); 
      $days[] = $current;
    }
    return $days;
  }