什么是@auth?它是短代码吗?我在welcome.blade.php中看到了这段代码
在哪里定义这个@auth代码函数?
任何想法请分享。
@auth是一个刀片指令,用于仅向登录的用户显示模板文件的各个部分。
@auth
或者,您可以使用@guest仅向未经身份验证的用户显示内容。
@guest
@auth所做的代码应该在src/Illuminate/View/Compilers/Concerns/CompilesConditionals.php的compileAuth方法中找到。
src/Illuminate/View/Compilers/Concerns/CompilesConditionals.php
compileAuth