<li role="presentation"><a role="menuitem" id="decline" tabindex="-1" href="{{ URL::Route('AdminProviderDecline', $walker->id) }}">Decline</a></li>
                                    <li role="presentation"><a role="menuitem" id="decline" tabindex="-1" href="{{ URL::Route('AdminProviderDelete', $walker->id) }}">Delete</a></li>

                                <?php 
    }
    ?>
                                <?php 
    /* $settng = Settings::where('key', 'allow_calendar')->first();
       if ($settng->value == 1) { */
    ?>
                                <!--<li role="presentation"><a role="menuitem" id="avail" tabindex="-1" href="{{ URL::Route('AdminProviderAvailability', $walker->id) }}">View Calendar</a></li>-->
                                <?php 
    /* } */
    ?>
                                <?php 
    $walker_doc = WalkerDocument::where('walker_id', $walker->id)->first();
    if ($walker_doc != NULL) {
        ?>
                                    <li role="presentation"><a id="view_walker_doc" role="menuitem" tabindex="-1" href="{{ URL::Route('AdminViewProviderDoc', $walker->id) }}">View Documents</a></li>
                                <?php 
    } else {
        ?>
                                    <li role="presentation"><a id="view_walker_doc" role="menuitem" tabindex="-1" href="#"><span class='badge bg-red'>No Documents</span></a></li>
                                <?php 
    }
    ?>
                                <!--<li role="presentation"><a role="menuitem" id="history" tabindex="-1" href="{{ web_url().'/admin/provider/documents/'.$walker->id }}">View Documents</a></li>-->
                            </ul>
                        </div>
                    </td>
                </tr>
 public function providerUpdateDocuments()
 {
     $inputs = Input::all();
     $walker_id = Session::get('walker_id');
     foreach ($inputs as $key => $input) {
         $walker_document = WalkerDocument::where('walker_id', $walker_id)->where('document_id', $key)->first();
         if (!$walker_document) {
             $walker_document = new WalkerDocument();
         }
         $walker_document->walker_id = $walker_id;
         $walker_document->document_id = $key;
         if ($input) {
             $file_name = time();
             $file_name .= rand();
             $file_name = sha1($file_name);
             $ext = $input->getClientOriginalExtension();
             $input->move(public_path() . "/uploads", $file_name . "." . $ext);
             $local_url = $file_name . "." . $ext;
             // Upload to S3
             if (Config::get('app.s3_bucket') != "") {
                 $s3 = App::make('aws')->get('s3');
                 $pic = $s3->putObject(array('Bucket' => Config::get('app.s3_bucket'), 'Key' => $file_name, 'SourceFile' => public_path() . "/uploads/" . $local_url));
                 $s3->putObjectAcl(array('Bucket' => Config::get('app.s3_bucket'), 'Key' => $file_name, 'ACL' => 'public-read'));
                 $s3_url = $s3->getObjectUrl(Config::get('app.s3_bucket'), $file_name);
             } else {
                 $s3_url = asset_url() . '/uploads/' . $local_url;
             }
             // send email
             $get = Walker::where('id', '=', $walker_id)->first();
             $pattern = "Hi, " . $get->first_name . ", ID " . $walker_id . " Uploaded his/her Document and waiting for the admin Approval.";
             $subject = "Waiting for an Approval";
             /* email_notification('', 'admin', $pattern, $subject); */
             if (isset($walker_document->url)) {
                 if ($walker_document->url != "") {
                     $icon = $walker_document->url;
                     unlink_image($icon);
                 }
             }
             $walker_document->url = $s3_url;
             $walker_document->save();
             /* if ($walker_document->save()) {
                echo 'asdasd';
                } */
         }
     }
     $message = "Your documents are successfully updated.";
     $type = "success";
     return Redirect::to('/provider/documents')->with('message', $message)->with('type', $type);
 }
 public function view_documents_provider()
 {
     $id = Request::segment(4);
     $provider = Walker::where('id', $id)->first();
     $provider_documents = WalkerDocument::where('walker_id', $id)->paginate(10);
     if ($provider) {
         $title = ucwords(trans('customize.Provider') . " View Documents : " . $provider->first_name . " " . $provider->last_name);
         /* 'Provider View Documents' */
         return View::make('view_documents')->with('title', $title)->with('page', 'walkers')->with('docs', $provider_documents)->with('provider', $provider);
     } else {
         return View::make('admin.notfound')->with('title', 'Error Page Not Found')->with('page', 'Error Page Not Found');
     }
 }