/*
|==============================================================
| How to create traits in laravel --
|==============================================================
| 1) There is no specific command for traits in Laravel 8.
| 2) Create Traits folder in app folder of laravel and add file
| UserTrait.php in that trait folder.
|
*/
<?php
namespace AppTraits;
trait UserTrait {
public function method1()
{
// write code here
}
public function method2()
{
// write code here
}
}