public function upload()
 {
     $folder = 'chess';
     $file = array('document' => Input::file('document'));
     $destinationPath = $folder . '/';
     // upload path
     $oName = Input::file('document')->getClientOriginalName();
     // get original upload name
     $extension = Input::file('document')->getClientOriginalExtension();
     // getting image extension
     $fileName = $oName;
     // renameing image
     Input::file('document')->move($destinationPath, $fileName);
     // uploading file to given path
     docs::create(array('docName' => $fileName, 'albumName' => $folder, 'location' => $destinationPath . $fileName));
     return redirect('admin');
 }
 public function delete($id)
 {
     $article = docs::findOrFail($id);
     $article->delete();
     return redirect('admin');
 }