shanely

shanely

Member Since 3 Years Ago

Experience Points 6,335
Experience Level 2

3,665 experience to go until the next level!

In case you were wondering, you earn Laracasts experience when you:

  • Complete a lesson — 100pts
  • Create a forum thread — 50pts
  • Reply to a thread — 10pts
  • Leave a reply that is liked — 50pts
  • Receive a "Best Reply" award — 500pts
Lessons Completed 6
Lessons
Completed
Best Reply Awards 0
Best Reply
Awards
  • start-engines Created with Sketch.

    Start Your Engines

    Earned once you have completed your first Laracasts lesson.

  • first-thousand Created with Sketch.

    First Thousand

    Earned once you have earned your first 1000 experience points.

  • 1-year Created with Sketch.

    One Year Member

    Earned when you have been with Laracasts for 1 year.

  • 2-years Created with Sketch.

    Two Year Member

    Earned when you have been with Laracasts for 2 years.

  • 3-years Created with Sketch.

    Three Year Member

    Earned when you have been with Laracasts for 3 years.

  • 4-years Created with Sketch.

    Four Year Member

    Earned when you have been with Laracasts for 4 years.

  • 5-years Created with Sketch.

    Five Year Member

    Earned when you have been with Laracasts for 5 years.

  • school-session Created with Sketch.

    School In Session

    Earned when at least one Laracasts series has been fully completed.

  • welcome-newcomer Created with Sketch.

    Welcome To The Community

    Earned after your first post on the Laracasts forum.

  • full-time-student Created with Sketch.

    Full Time Learner

    Earned once 100 Laracasts lessons have been completed.

  • pay-it-forward Created with Sketch.

    Pay It Forward

    Earned once you receive your first "Best Reply" award on the Laracasts forum.

  • subscriber-token Created with Sketch.

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • lifer-token Created with Sketch.

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • lara-evanghelist Created with Sketch.

    Laracasts Evangelist

    Earned if you share a link to Laracasts on social media. Please email [email protected] with your username and post URL to be awarded this badge.

  • chatty-cathy Created with Sketch.

    Chatty Cathy

    Earned once you have achieved 500 forum replies.

  • lara-veteran Created with Sketch.

    Laracasts Veteran

    Earned once your experience points passes 100,000.

  • 10k-strong Created with Sketch.

    Ten Thousand Strong

    Earned once your experience points hits 10,000.

  • lara-master Created with Sketch.

    Laracasts Master

    Earned once 1000 Laracasts lessons have been completed.

  • laracasts-tutor Created with Sketch.

    Laracasts Tutor

    Earned once your "Best Reply" award count is 100 or more.

  • laracasts-sensei Created with Sketch.

    Laracasts Sensei

    Earned once your experience points passes 1 million.

  • top-50 Created with Sketch.

    Top 50

    Earned once your experience points ranks in the top 50 of all Laracasts users.

30 Nov
7 months ago

shanely started a new conversation Controller Problem

Hi guys,

In controller is it wrong to use echo data not return data? .

Thank you in advance.

08 Jul
1 year ago

shanely left a reply on How To Logout Mobile App Using Passport

@Cronix

Thank you for the reply...my mobile app has login form..after I successfully send my username.and passowrd I grab the acess token in th response of my server.so how can i log out my mobile app if i have the access token?...can you please enlighten my mind or give some example that mobile app is using laravel passport to access the api...I think I am confuse on this laravel passport.

shanely left a reply on Refresh Token Confuse When To Use

@NickVahalik thank you for the reply...but I was not able to imagine or picture out how to do this in code...do i need to store the refresh token in my mobile app?..I am confuse how to do this in action.can you please show simple code when to use the refresh token...as what i understand if my access token will not work anymore i will use the refresh token?

Thank you in advance

07 Jul
1 year ago

shanely started a new conversation How To Logout Mobile App Using Passport

I am newbie to laravel passport and I having difficulty on how you guys logout your mobile app using laravel passport ?

Thank you in advance.

shanely started a new conversation Refresh Token Confuse When To Use

Hi I am fresh in laravel passport, I tried in my localhost http://mytestapp/oauth/token it gives me expires_in, access_token,refresh_token,

I grab the access_token to access my mobile api in server, but what what about the refresh_token when should I use this ? please enlighten my mind

Thank you in advance

16 May
1 year ago

shanely started a new conversation Why We Should Use REDIS In Dealing With Jobs ?

Hi is it necessary to use redis in dealing with jobs ? I haven't use redis yet and I am not familiar how this work in real world.

Thank you in advance

05 Mar
1 year ago

shanely started a new conversation Php Unit Testing In Update Method Resource

Hi I want to test my code inside the update method if it will upload the picture but I always get error says page not found.

here is my testexample

 public function testBasicTest()
    {
       $response =
            $this->json('PUT','/user/5', [
                'pic' => UploadedFile::fake()->image('myprofilepic.png')
            ]);

        $response->assertSeeText('success!');
       

    }

25 Feb
1 year ago

shanely left a reply on How To Use Auth In Error Page ?

this is the error

in my blade resources/views/errors/404.blade.php {{ Auth::user()->getAttribute('id) }}

Call to a member function getAttribute() on null (View: C:\wamp64\www\myproject\resources\views\errors\404.blade.php)

24 Feb
1 year ago

shanely left a reply on How To Use Auth In Error Page ?

@skliche,

I think it is impossible to access the Auth::user() in error page.

shanely started a new conversation How To Use Auth In Error Page ?

Hi, I need to access the Auth in error page which is reside in resources/views/errors example Auth::use()->id

I am using 5.4 laravel

Thank you in advance

03 Aug
1 year ago

shanely started a new conversation Storage Symbolic Link Doesn't Sync

Hi I am uploading my file image to the storage/app/public/imageprofile

my problem is that the symbolic link is not syncing everytime I upload Image

I already set php artisan storage:link for the first time.

Thank you in advance.

shanely left a reply on Problem In Upload Image Using Storage

@saurabhd,

Is this will show in storage/app/public/imgprofile ?

shanely left a reply on Cannot Display Image If Extension Is Jpeg.

@sarabhd,

this is what it looks like

http://localhost/myproject/storage/attachement/71e03ee10c5914a7abd27131e0d1ca6f.jpeg

also I noticed it doesn't sync to storage folder .

symbolic link

public/storage/attachement

but it storage/app/public/attachement , the file is there.

Thank you in advance.

shanely left a reply on Problem In Upload Image Using Storage

@saurabhd ,

what if I have also another folder like imgprofile ? do I need to add another root ? .. also is this correct disk('uploads') not 'local' ? ..

Thank you in advance.

shanely started a new conversation Cannot Display Image If Extension Is Jpeg.

I am having problem I am manually put the image file in the storage link. now my image extension is jpeg and it will not display . but jpg or png works fine. I don't know why it will not display jpeg.

I am displaying this via js

$("#myimage").attr("src", URL + data.pathimage);

Thank you in advance.

shanely started a new conversation Problem In Upload Image Using Storage

I need some help please I want to store my uploaded file in storage/app/public/myuploaded

I also set php artisan storage:link

when I upload it.

 $attachement = new Attachement();
 $imagefile = $request->imagefile;
 $filename = Storage::disk('local')->put($imagefile );
 $attachement->filename = $filename;
 $attachement->save();

when I look at in the myuploaded folder it did not store., also in the storage link it doesn't store.

can you help me please.

Thank you in advance.

27 Jul
1 year ago

shanely started a new conversation Need Some Help In Webpack

Hi can I ask some help please, I am new in webpack, and I heard it's good to use...I have many js local files plugins loaded in my myapp.blade.php

ex:

bootstrap-datetimepicker.min.js
bootstrap-switch.min.js
jquery-ui.js
myapp.js
...
...
etc...
  

my question for this how can I make them into 1 js file ?

Thank you in advance.

22 Jun
2 years ago

shanely left a reply on Laravel 5.4 Why I Can't Use Varchar 255 ?

what happen if I will store 200 characters in that column 191 length ?

shanely started a new conversation Laravel 5.4 Why I Can't Use Varchar 255 ?

can someone enlighten my mind. I am installing laravel 5.4 when I migrate I get error too long so I search and I found this https://laravel-news.com/laravel-5-4-key-too-long-error . now when my column with datatype varchar is only limited to 191 length ?. my question for this why is this 191 not 255 ?

Thank you in advance.

21 Jun
2 years ago

shanely left a reply on Error: Spawn Node_modules/webpack/bin/webpack.js ENOENT

@probably_joe ,

you did not delete the folder node_modules ? before running again the command npm install ?

shanely left a reply on Error: Spawn Node_modules/webpack/bin/webpack.js ENOENT

@probably_joe ,

I fixed mine here... install the latest node.js or LTS 6 above version...then delete your node_modules , and then install back using npm install , then you can now npm run dev.. with no error.

hope it helps.

20 Jun
2 years ago

shanely started a new conversation Why We Should Mix Our All Js Files In Webpack ?

Hi can I ask I am confuse why we should mix all our js files in 1 file app.js ? webpack mix all our js file in 1 file, is there no any downside if we mix all our js , is this will not cause trouble in our script ?

Thank you in advance.

shanely started a new conversation Webpack Need Help

I need some help to enlighten my mind. I am new in laravel5.4 and I found out they use webpack, I never tried this before...my question for this,inside webpack.min.js,

mix.js('resources/assets/js/app.js', 'public/js')

can I also add another js file ? so the content will be like this. mix.js('resources/assets/js/app.js', 'public/js') mix.js('resources/assets/js/mynew1.js', 'public/js') mix.js('resources/assets/js/mynew2.js', 'public/js')

same also in my css ?

Thank you in advance.

shanely started a new conversation Error: Spawn Node_modules/webpack/bin/webpack.js ENOENT

Hi I am in windows 10 when I issue the command npm run dev. it shows error

`Error: spawn node_modules/webpack/bin/webpack.js ENOENT

at notFoundError (C:\wamp\www\myproj\node_modules\cross-env\node_modules\cross-spawn\lib\enoent.js:11:11) at verifyENOENT (C:\wamp\www\myproj\node_modules\cross-env\node_modules\cross-spawn\lib\enoent.js:46:16) at ChildProcess.cp.emit (C:\wamp\www\myproj\node_modules\cross-env\node_modules\cross-spawn\lib\enoent.js:33:19) at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)

Thank you in advance. `

shanely started a new conversation Are You All Using Vagrant ?

Hi can I ask some of your opinions ? do you always use vagrant in developing web app like laravel ? . just noticed in my phpstorm when I use vagrant up. my phpstorm is starting laggy. and sometimes it freezes.

Thank you in advance.

shanely started a new conversation Specified Key Was Too Long Error

according to the author see https://laravel-news.com/laravel-5-4-key-too-long-error

as long as you running MySQL v5.7.7 and higher you do not need to do anything.

I check my version select version() , it gives me this

5.7.9

but why I am still hitting the error ?

Thank you in advance

03 Jun
2 years ago

shanely left a reply on How Does Laravel Use The Session In Framework Itself

@Snapey @usman @gator ,

Thank you for your all inputs, I will read all your links.

shanely started a new conversation How Does Laravel Use The Session In Framework Itself

can I ask in laravel core where does the session play in framework itself where does the session started, I didn't see the session_start in the core.

Thank you in advance.

16 May
2 years ago

shanely started a new conversation Laravel Occupies 100% Space In My GCE Server

I have problem I don't know why suddenly happen this to me, I have 10GB disk in my GCE server,my laravel application cannot run anymore because the disk is full...I have no other big files , the users only upload excel sheet. but it is not big. can some help me on this please how can clear some space.

Thank you in advance.

27 Mar
2 years ago
26 Mar
2 years ago

shanely left a reply on It Always Show I.p Adress Instead Subdomain

Hi, I tested it but it did not work

24 Mar
2 years ago

shanely started a new conversation It Always Show I.p Adress Instead Subdomain

I set subdomain in my go daddy account and point to i.p address of my other server GCE (google compute engine). in GCE i created serverblock in my nginx it works fine. when I visit like this in browser..http://mysubdomain.domain.com it load the page with no problem...but after few hours when i visit .http://mysubdomain.domain.com it will redirect to the i.p address..also I noticed that when view it in mobile it always redirect me to the i.p address of my GCE server not the subdmoin name..is this problem of htaccess ?

I have this htaccess on my root of my project folder

RewriteEngine On

RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/$ /$1 [L,R=301]

RewriteCond %{REQUEST_URI} !(\.css|\.js|\.png|\.jpg|\.gif|robots\.txt)$ [NC]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} !^/public/
RewriteRule ^(css|js|img)/(.*)$ public/$1/$2 [L,NC]

How can I show always the subdomain name not the i.p address.

Thank you in advance.

20 Feb
2 years ago

shanely started a new conversation Notification For Laravel 5.2

Hi how do you create database notifications for laravel 5.2 or what package to use for notifications ?

Thank you in advance.

13 Feb
2 years ago

shanely left a reply on I Cannot Attach File In Build Method

anyone here attempt to try mailable attachment ?

shanely left a reply on I Cannot Attach File In Build Method

@tomi,

what is the mime for xls ?

shanely started a new conversation I Cannot Attach File In Build Method

I need some help please, what is wrong of my code ?, it throws error

Argument 2 passed to Illuminate\Mail\Message::attach() must be of the type array, null given, called in C:\wamp\www\requisition\vendor\laravel\framework\src\Illuminate\Mail\Mailable.php on line 259 and defined

      $subject = 'Need help';
        $path = public_path() . '/attachment/';
      

        return $this->view('emails.poattachment')
            ->attach( $path.'14869702460.xls' ) 
            ->cc('[email protected]')
            ->subject($subject);


29 Jan
2 years ago

shanely started a new conversation Is It Possible To Mock Upload File ?

Hi please help me I am new in testing, I have method to upload file . Is it possible to mock my method upload to see to it's working ?

Thank you in advance

27 Jan
2 years ago

shanely started a new conversation I Need To Test Upload Image

Hi I am new in phpunit testing...is it possible to test my upload image using phpunit ?... I have no idea how,so i don't have code to show you guys...I hope you excuse me for this...please show me how to do it in testing the upload the proper way.

Thank you in advance

07 Jan
2 years ago

shanely started a new conversation How To Access $request Parameter

Hi in my controller I Have this validation

if($request->category== 1){
     $this->validate($request, [
                'requestdate' => 'required',
                'department' => 'required',
               

            ]

}
else{
    $this->validate($request, [
                  'requestdate' => 'required',
                 'department' => 'required',
                 'customer' => 'required',
            ]

}

Now I create request form php artisan make:request CreateCustomerRequest

 public function rules()
    {
        //here how to access to do the if statement ?
    }

Thank you in advance.

14 Dec
2 years ago

shanely started a new conversation Cannot Validate Xls Extension Only Xlsx Validated

Hi I need some help please when I tried to upload excel file with extension .xls , it goes to my validation it will not upload, but if I use the .xlsx extension it works fine it will upload.

here is my validation

$this->validate($request,[

'myupload' =>'required|mimes:xlsx,xls',     

]

Thank you in advance

13 Dec
2 years ago

shanely left a reply on Download Excel File

Thank you guys

12 Dec
2 years ago

shanely started a new conversation Download Excel File

Hi I need some help please I have excel file which is uploaded by users now I want to view the uploaded excel which is stored in folder store/uploaded , the filename is stored in mysql database, now my problem is how can I download the file which is uploaded by the user ?

how to call the file excel so that it will be downloaded ?

Thank you in advance.

02 Dec
2 years ago

shanely left a reply on Can I Upload My Laravel In Hosting Site (Go Daddy) ?

guyz what about amazon or digital ocean ?

shanely left a reply on Can I Upload My Laravel In Hosting Site (Go Daddy) ?

Is laravel forge is cloud ?

25 Nov
2 years ago

shanely started a new conversation Can I Upload My Laravel In Hosting Site (Go Daddy) ?

Hi, I have exsiting project in my local machine I would like to put this online and I would like to put in Go Daddy since I have account in go daddy. my question for this is it possible laravel can run in hosting site .

03 Oct
2 years ago

shanely started a new conversation Update Homestead To Php7

Hi I am trying to udpdate my homestead to php7 ...what I did is I destroy the box and use this command "vagrant box add laravel/homestead" that is stated in the docs 5.3 my existing Homestead.yaml I did not touch it. after downloading the box takes 4 hours ..when I vagrant up and see the php vertion it is not php7 still php 5.6. can someone help me on this please how to make it php7?

Thank you in advance.

26 Jul
2 years ago

shanely left a reply on Call To A Member Function Move() On String

@jimmck ,

Thank you, I did not use package for uploading , by the way can I upload large video or movies ?

Thank you in advance.

shanely left a reply on Call To A Member Function Move() On String

Thank you I fixed it now.

shanely left a reply on Call To A Member Function Move() On String

@jimmck,

you mean like this ?

 $request->filevideo->move($path . $filename);

but the uploaded file is like this php4BBC.tmp when I look at in the folder.