If you are issuing personal access tokens using the User model's createToken method, you may pass the array of desired scopes as the second argument to the method:1$token = $user->createToken('My Token', ['place-orders'])->accessToken;...
After the configuration file has been published, you may load your application's encryption keys by defining them as environment variables:1PASSPORT_PRIVATE_KEY="---BEGIN RSA PRIVATE KEY--- 2<private key here> 3---END RSA PRIVATE KEY---" 4 5PASSPORT_PUBLIC_KEY="---BEGIN PUBLIC KEY...
在Nginx中,配置一个站点来运行Laravel应用: server{listen80;server_nameexample.com;root/var/www/html/laravel/public;indexindex.phpindex.htmlindex.htm;location/{try_files$uri$uri//index.php?$query_string;}location~\.php${includesnippets/fastcgi-php.conf;fastcgi_passunix:/var/run/php/php8.0-fpm....
public function onOpen(Server $server, Request $request) { // Before the onOpen event is triggered, the HTTP request to establish the WebSocket has passed the Laravel route, // so Laravel's Request, Auth information are readable, Session is readable and writable, but only in the onOpen ev...
We'll locally be able to send emails, flash failed form error messages to the front end, pass success form messages to the front end, setup the ability to re-populate "old" form data AKA failed form data so our users don't have to re-type everything in if the validation for the ...
Serverless::Service' Properties: Description: 'LaravelS Demo for Serverless' fc-laravel-s: Type: 'Aliyun::Serverless::Function' Properties: Handler: laravels.handler Runtime: custom MemorySize: 512 Timeout: 30 CodeUri: ./ InstanceConcurrency: 10 EnvironmentVariables: BOOTSTRAP_FILE: laravels_...
You can indicate how long a checkout session should stay active by calling the expiresAt method on it:$request->user()->checkout('variant-id') ->expiresAt(now()->addDays(3));Custom DataYou can also pass along custom data with your checkouts. To do this, send along key/value ...
Variables should be stored as KEY=value, one on each line. You can retrieve values from the .env file with the env() function. For example, let’s say you’re using AWS and you need a secret key to connect to it. After you have defined AWS_KEY inside .env, you can access it ...
# vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/LoadEnvironmentVariables.phpclassLoadEnvironmentVariables{/** * Bootstrap the given application. * * @param \Illuminate\Contracts\Foundation\Application $app * @return void */publicfunctionbootstrap(Application$app){if($app->configurationIsCach...
public:静态资源目录,并包含了首页文件 index.php。 resource:包含了未编译的源文件(模板、语言、资源)。 routes:包含了所有的路由定义。 storage:包含了编译好的模板文件,session 文件,缓存文件,日志等文件。 tests:包含了自动测试文件。运行测试命令php vendor/bin/phpunit。 vendor:composer 依赖目录。app...