小编MJ7*_*MJ7的帖子

Laravel Passport Route [登录]未定义

我使用Laravel护照进行身份验证

在路线api.php中

Route::get('/todos', function(){
  return 'hello';
})->middleware('auth:api');
Run Code Online (Sandbox Code Playgroud)

但是当打开localhost:8000 / api / todos时,我看到以下错误

 InvalidArgumentException
Route [login] not defined.
 * @return string
 *
 * @throws \InvalidArgumentException
 */
public function route($name, $parameters = [], $absolute = true)
{
    if (! is_null($route = $this->routes->getByName($name))) {
        return $this->toRoute($route, $parameters, $absolute);
    }

    throw new InvalidArgumentException("Route [{$name}] not defined.");
}

/**
 * Get the URL for a given route instance.
 *
 * @param  \Illuminate\Routing\Route  $route
 * @param  mixed  $parameters
 * @param  bool   $absolute
 * @return string
 * …
Run Code Online (Sandbox Code Playgroud)

php laravel laravel-passport

6
推荐指数
4
解决办法
1万
查看次数

laravel安装失败,删除./composer.json

嗨在Laravel安装中发生以下错误

user@user-System-Product-Name:/$ composer global require "laravel/installer"
Changed current directory to /home/user/.config/composer

Using version ^2.0 for laravel/installer
./composer.json has been created
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - laravel/installer v2.0.1 requires ext-zip * -> the requested PHP extension zip is missing from your system.
    - laravel/installer v2.0.0 requires ext-zip * -> the requested PHP extension zip is missing from your system.
    - Installation …
Run Code Online (Sandbox Code Playgroud)

laravel composer-php

5
推荐指数
2
解决办法
1万
查看次数

如何修复Android Studio 3中的'无法找到符号类为可空'的错误

我正在使用android studio 3.2,并且想在我的空白类中使用SQLiteOpenHelper。当我运行项目Java编译器时返回错误:找不到符号类可为空

public class Db extends SQLiteOpenHelper {
public Db(@androidx.annotation.Nullable Context context, @androidx.annotation.Nullable String name, @androidx.annotation.Nullable SQLiteDatabase.CursorFactory factory, int version) {
    super(context, name, factory, version);
}}
Run Code Online (Sandbox Code Playgroud)

我也用了这个实现

implementation 'com.android.support:support-annotations:24.2.0'
Run Code Online (Sandbox Code Playgroud)

我单击了“使缓存无效”,然后在文件菜单上重新启动并重建项目,但仍然发生错误

先感谢您

android gradle android-studio

0
推荐指数
1
解决办法
4160
查看次数