title: Send image to the laravel api using postman but getting null
body: <p>Hi i'm trying to create new profile by post through laravel api. All data was submitted to database except image file that fill with NULL. I've try this <a href="https://stackoverflow.com/questions/28093586/send-file-with-postman-to-laravel-api">Send file with postman to Laravel API</a> but still didn't solve the problem. My header is Accept:application/json and Authorization:Bearer <strong>token</strong>. Body is form-data. </p>
  
  <p>This is my ProfilesController.php</p>
  
  <pre><code>&lt;?php
  
  namespace App\Http\Controllers\Api\V1;
  
  use App\Acls\ProfilesAcl;
  use App\Http\Controllers\Controller;
  use App\Repositories\ProfilesRepository;
  use App\Profile;
  use App\Validators\ProfilesValidator;
  use Illuminate\Http\Request;
  use Illuminate\Support\Facades\Storage;
  use Illuminate\Support\Facades\File;
  use Illuminate\Http\Response;
  
  class ProfilesController extends Controller
  {
      //
      public function index()
      {
          return $this-&gt;repository-&gt;lists();
      }
  
      public function store()
      {
          return $this-&gt;repository-&gt;create();
      }
  
      public function show(Profile $profile)
      {
          return $profile-&gt;load('user');
      }
  
      public function update(Profile $profile)
      {
          return $this-&gt;repository-&gt;update($profile);
      }
  
      public function destroy(Profile $profile)
      {
          $this-&gt;repository-&gt;delete($profile);
      }
  
      public function __construct(ProfilesRepository $repository, Request $request)
      {
          parent::__construct();
          $this-&gt;middleware([
              'acl:' . ProfilesAcl::class,
              'validate:' . ProfilesValidator::class,
          ]);
          $this-&gt;repository = $repository;
          $this-&gt;request = $request;
      }
  }
  </code></pre>
  
  <p>This is my ProfilesRepository.php</p>
  
  <pre><code>&lt;?php
  
  namespace App\Repositories;
  
  use App\Profile;
  use App\User;
  
  use Illuminate\Support\Facades\Storage;
  use Illuminate\Support\Facades\File;
  use Illuminate\Http\Response;
  use Illuminate\Http\Request;
  
  class ProfilesRepository extends BaseRepository
  {
  
      protected function extractData($extracted = [])
      {
          $extracted = [];
          if ($this-&gt;request-&gt;has('fullname')) {
              $extracted['fullname'] = $this-&gt;request-&gt;get('fullname');
          }
  
          if ($this-&gt;request-&gt;has('bdate')) {
              $extracted['bdate'] = $this-&gt;request-&gt;get('bdate');
          }
  
          if ($this-&gt;request-&gt;has('numphone')) {
              $extracted['numphone'] = $this-&gt;request-&gt;get('numphone');
          }
  
          if ($this-&gt;request-&gt;hasFile('image')) {
              $image_file = $this-&gt;request-&gt;file('image');
              $image_extension = $image_file-&gt;getClientOriginalExtension();
              $extracted['image_filename'] = $image_file-&gt;getFilename().'.'.$image_extension;
              $extracted['original_image_filename'] = $image_file-&gt;getClientOriginalName();
              $extracted['image_mime'] = $image_file-&gt;getClientMimeType();
              Storage::disk('local')-&gt;put($image_file-&gt;getFilename().'.'.$image_extension,  File::get($image_file));
          }
  
          return $extracted;
      }
  
      public function lists()
      {
          $profile = $this-&gt;user-&gt;profiles();
  
          if ($fullname = $this-&gt;request-&gt;get('fullname')) {
              $profile-&gt;where('fullname', 'like', "%{$fullname}%");
          }
  
          if ($bdate = $this-&gt;request-&gt;get('bdate')) {
              $profile-&gt;where('bdate', 'like', "%{$bdate}%");
          }
  
          if ($numphone = $this-&gt;request-&gt;get('numphone')) {
              $profile-&gt;where('numphone', 'like', "%{$numphone}%");
          }
  
          return $profile-&gt;paginate();
      }
  
      public function create()
      {
          return $this-&gt;user-&gt;profiles()-&gt;create($this-&gt;extractData());
      }
  
      public function update(Profile $profile)
      {
          $profile-&gt;update($this-&gt;extractData());
          return $profile;
      }
  
      public function delete(Profile $profile)
      {
          $profile-&gt;delete();
          return $profile;
      }
  
  }
  </code></pre>
  
  <p>This is my Profile.php</p>
  
  <pre><code>&lt;?php
  
  namespace App;
  
  use Illuminate\Foundation\Auth\User as Authenticatable;
  
  class Profile extends Authenticatable
  {
      //
      /**
       * The attributes that are mass assignable.
       *
       * @var array
       */
      protected $fillable = [
          'fullname', 'bdate', 'numphone', 'image',
      ];
  
      public function user()
      {
          return $this-&gt;belongsTo(User::class);
      }
  }
  </code></pre>
  
  <p>I've try dd() at the function store() in the ProfilesController.php and get this</p>
  
  <pre><code>Profile {#276
    #fillable: array:4 [
      0 =&gt; "fullname"
      1 =&gt; "bdate"
      2 =&gt; "numphone"
      3 =&gt; "image"
    ]
    #connection: null
    #table: null
    #primaryKey: "id"
    #perPage: 15
    +incrementing: true
    +timestamps: true
    #attributes: array:7 [
      "fullname" =&gt; "Abdul"
      "bdate" =&gt; "date"
      "numphone" =&gt; "0174670850"
      "user_id" =&gt; 1
      "updated_at" =&gt; "2016-05-13 17:14:26"
      "created_at" =&gt; "2016-05-13 17:14:26"
      "id" =&gt; 11
    ]
    #original: array:7 [
      "fullname" =&gt; "Abdul"
      "bdate" =&gt; "date"
      "numphone" =&gt; "0174670850"
      "user_id" =&gt; 1
      "updated_at" =&gt; "2016-05-13 17:14:26"
      "created_at" =&gt; "2016-05-13 17:14:26"
      "id" =&gt; 11
    ]
    #relations: []
    #hidden: []
    #visible: []
    #appends: []
    #guarded: array:1 [
      0 =&gt; "*"
    ]
    #dates: []
    #dateFormat: null
    #casts: []
    #touches: []
    #observables: []
    #with: []
    #morphClass: null
    +exists: true
    +wasRecentlyCreated: true
  }
  </code></pre>
  
  <p>I don't know whats wrong and i need help. Thank You.</p>