I am trying to use Laravel 5 for uploading photos for each user.
I made those changes that I need to:
- view / auth / register.blade.php
- App / User Php
- App /services/Registrar.php
And registration works fine.
But when I try to add file upload logic, my problem is in the registrar.php.
I've added:
Enlighten \ HTP; use the request;
But create the method by using it:
request :: hasFile ()
< P> returns an error that can not be used as a static.
Use dependency injection.
Enlighten \ HTP \ Use the request; Class FooController Controller {Public Function __Composition (Request $ Request) Reaches {$ this- & gt; Request = $ request; } Public function bar () {dd ($ this- & request; & gt; hasil ('key')); }}
No comments:
Post a Comment