daily pastebin goal
46%
SHARE
TWEET

Untitled

a guest Feb 21st, 2019 52 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public function subirInformes(Request $request, $idPaciente) {
  2.         $model = new Model;
  3.         $model->data_id = $request->input('data_id');
  4.         $model->data2_id = $request->input('data2_id');
  5.         $model->tipo_archivo = $request->input('tipo-archivo');
  6.         if ($request->has('espeficique-tipo')) {
  7.             $model->especificar_tipo = $request->input('espeficique-tipo');
  8.         }
  9.         $model->path = $request->file('file-archivo')->getClientOriginalName();
  10.  
  11.         if ($request->has('file-archivo')) {
  12.             $request->file('file-archivo')->storeAs('directorio',
  13.                 $request->file('file-archivo')->getClientOriginalName());
  14.         }
  15.         $model->save();
  16.         return redirect()->route('algunaruta',
  17.             $request->input('data_id')
  18.         );
  19.     }
  20.      
  21. 'disks' => [
  22.  
  23.     'local' => [
  24.         'driver' => 'local',
  25.         'root' => storage_path('app'),
  26.     ],
  27.  
  28.     'public' => [
  29.         'driver' => 'local',
  30.         'root' => storage_path('app/public'),
  31.         'url' => env('APP_URL').'/storage',
  32.         'visibility' => 'public',
  33.     ],
  34.  
  35.     's3' => [
  36.         'driver' => 's3',
  37.         'key' => env('AWS_ACCESS_KEY_ID'),
  38.         'secret' => env('AWS_SECRET_ACCESS_KEY'),
  39.         'region' => env('AWS_DEFAULT_REGION'),
  40.         'bucket' => env('AWS_BUCKET'),
  41.         'url' => env('AWS_URL'),
  42.     ],
  43.  
  44. ],
  45.      
  46. ; Maximum allowed size for uploaded files.
  47. upload_max_filesize = 40M
  48.  
  49. ; Must be greater than or equal to upload_max_filesize
  50. post_max_size = 40M
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top