protected function create(array $data) { $salt = Str::random(6); return User::create([ 'nickname' => $data['name'], 'email' => $data['email'], 'password' => sha1($salt . $data['password']), 'register_time' => time(), 'reg/【一个开发人员,能懂服务器量好,反之一个服务器...
The view function accepts a second argument which is an array of data that will be made available to the view, where each key in the array will become a variable within the view. For example, we could do this:1/** 2 * Display a list of all of the user's task. 3 * 4 * @...
12 * @var array 13 */ 14 protected $guarded = ['price']; 15}If you would like to make all attributes mass assignable, you may define the $guarded property as an empty array:1/** 2 * The attributes that aren't mass assignable. 3 * 4 * @var array 5 */ 6protected $guarded =...
($name, $value); } if (function_exists('putenv')) { putenv("$name=$value"); } $_ENV[$name] = $value; $_SERVER[$name] = $value; } public function getEnvironmentVariable($name) { switch (true) { case array_key_exists($name, $_ENV): return $_ENV[$name]; case array_key_...
protected function getRouteForMethods($request, array $methods) { if ($request->method() == 'OPTIONS') { return (new Route('OPTIONS', $request->path(), function () use ($methods) { return new Response('', 200, ['Allow' => implode(',', $methods)]); ...
If necessary, please clean or reset them manually. Infinitely appending element into static/global variable will lead to OOM(Out of Memory). class Test { public static $array = []; public static $string = ''; } // Controller public function test(Request $req) { // Out of Memory Test...
Instead of specifying adokey, you must define acankey with the name of the ability you want to check. Since Laravel 5.5, you can also specify an array of abilities, and every one will be checked. By default, the object instance will be passed as an argument to the gate. You can also...
array-unique "^0.3.2" extend-shallow "^2.0.1" fill-range "^4.0.0" isobject "^3.0.1" repeat-element "^1.1.2" snapdragon "^0.8.1" snapdragon-node "^2.0.1" split-string "^3.0.2" to-regex "^3.0.1" brorand@^1.0.1: version "1.1.0" ...
array-unique "^0.3.2" extend-shallow "^2.0.1" fill-range "^4.0.0" isobject "^3.0.1" repeat-element "^1.1.2" snapdragon "^0.8.1" snapdragon-node "^2.0.1" split-string "^3.0.2" to-regex "^3.0.1" brorand@^1.0.1: version "1.1.0" ...
$middlewares = $this->app->shouldSkipMiddleware() ? [] : array_merge( $this->gatherRouteMiddleware($request), $this->middleware ); foreach ($middlewares as $middleware) { if (! is_string($middleware)) { continue; } [$name] = $this->parseMiddleware($middleware); ...