wjun1801317388

590 经验值

自定义类:
namespace AppHttpservicesregister;

use AppHttpmodelregistersign;
use AppHttpservicescommonInter;
use AppHttpservicescommonDemo;
use IlluminateHttpRequest;
use IlluminateContractsValidationValidator;

class Resign extends Demo implements Inter{

public $request;

public function __construct(Request $request)
{
    $this->request = $request;
}

public function logic(){

    dd($this->request->all());
}

}
控制器:
namespace AppHttpControllersAdmin;

use AppHttpservicescommonDemo;
use IlluminateHttpRequest;
use AppHttpservicesregisterResign;
use IlluminateContractsValidationValidator;
class SignController extends Demo
{

public function Register(){
        $reg =new Resign((new Request()));
        $reg->logic();
}

}
请问 :我依赖注入Request 类 ,我在自定义类里打印 总是空数组,我前台表单 已经提交数据了。

我在自己的接口 里面 引入 use IlluminateHttpRequest;
提示 : FatalErrorException in Resign.php line 10:
Declaration of AppHttpservicesregisterResign::logic(IlluminateHttpRequest $request) must be compatible with AppHttpservicescommonInter::logic()

代码:
//控制器调用接口。

  use App\Http\services\register\Resign;
              $reg =new Resign();
              $reg->logic();

//接口。
<?php

 namespace App\Http\services\register;
 use App\Http\model\register\sign;
 use App\Http\services\common\Inter;
 use App\Http\services\common\Demo;
 use Illuminate\Http\Request;
class Resign extends Demo implements Inter{
        public function logic(Request $request){
                      dd($request->all());
        }
}

?>
请问 怎么解决。谢谢!

错误:FatalErrorException in BillingServerProvider.php line 27:
Class 'AppProvidersLoginAdmin' not found

ServerProvider.php:

public function register()

{
    $this->app->bind('Billing',function(){
        return new LoginAdmin();
    });
}

Login.php
<?php
namespace AppBilling;

class LoginAdmin{

public $name;
public $password;
public function __construct($name='',$password='')
{
    $this->name = $name;
    $this->password = $password;
}
public function Account(){
    if(isset($this->name)&&!empty($this->name)){
        return $this->name;
    }else{
        return $this->name = '';
    }
}

}
?>
控制器:

$login = app('Billing');
dd($login);

'domain'=>'www.baidu.com','domain'=>'ip', 想 'www.baidu.com 这个也能访问 服务器的真实IP 也能访问,这个写法怎么写的??

'domain'=>env('DOMAIN')

DOMAIN=www.baidu.com
DOMAIN=www.haoxiangjia.com
上面 写不行 我想实现 这俩个 域名 多可以访问到网站 ,请问怎么处理?谢谢!!!

能 出个 laravel 5 和 workerman 融合的视频吗??