How to get the current authenticated admin user id in Form field value
$form->text('created_by', 'created_by')->default(Admin::user()->id)->setWidth(3, 2);
Error:
Symfony Component Debug Exception FatalThrowableError (E_ERROR)
Class 'AppAdminControllersAdmin' not found
@rajkumarForDev you must add to header
use Encore\Admin\Facades\Admin;
and then you can use Admin::user()->id
Most helpful comment
@rajkumarForDev you must add to header
use Encore\Admin\Facades\Admin;and then you can use
Admin::user()->id