Author: Not specified Language: php
Description: Not specified Timestamp: 2017-07-15 04:49:29 +0000
View raw paste Reply
  1. <?php
  2.  
  3. namespace App\Http\Controllers;
  4.  
  5. use Illuminate\Http\Request;
  6. use Illuminate\Http\Response;
  7.  
  8. class MyController extends Controller
  9. {
  10.     // My first controller
  11.     public function XinChao(){
  12.         return 'Hello everybody';
  13.     }
  14.  
  15.     public function check(Request $re){
  16.         echo $re->URL();
  17.     }
  18.  
  19.     public function uploadForm(){
  20.         return view('upload');
  21.     }
  22.  
  23.     public function postFile(Request $re){
  24.         if($re->hasFile('myFile')){
  25.             echo "Da co file";
  26.         }else{
  27.             echo "chua co file";
  28.         }
  29.     }
  30. }
  31.  
View raw paste Reply