How to use laravel tinker and what can we do with tinker?

We can use tinker for communicating with our application and testing every thing through the thinker. if you don't know how to use thinker, you can read documentation of laravel official website.

Here i am writing  steps to use tinker.

Step 1

      Open your command prompt. and go to your project directory.

Step 2

      write command to start tinker.
      "php artisan tinker"

step 3

      To test, if tinker is  working or not.
      Write command to find all of user data of your application .

      write command to change current password of any user using tinker.
     1. "$u = App\User::find(1);"
     2. "$u->password = bcrypt('12345');"
     3. "$u->save();"

    You have changed the password of your application user which has id =1


  1. kbdhccnhd ejcbcehc cbjd ef eufnefhre febfefefbcecber ccjbcecenej ebehjdejd

  2. wdwd weefre grtrgtyhy juyjujhht 76yjyjh jykukujy ykukjuytgt yujuy hyujuykikuythy yujuy kumuy yjuj uyjujujuu

  3. This is very useful.


Powered by Blogger.