我不明白这些错误:
[08-Sep-2016 15:49:43 Europe/Rome] PHP Fatal error: App\Provider\RouteServiceProvider::main(): Failed opening required 'http://localhost:8888/vicker-backend/website/public/Routes/admin.php' (include_path='.:/Applications/MAMP/bin/php/php7.0.8/lib/php') in /Applications/MAMP/htdocs/vicker-backend/website/app/Http/routes.php on line 24
[08-Sep-2016 15:49:43 Europe/Rome] PHP Fatal error: Uncaught InvalidArgumentException: Route [boss.index] not defined. in /Applications/MAMP/htdocs/vicker-backend/website/vendor/laravel/framework/src/Illuminate/Routing/UrlGenerator.php:306
Stack trace:
#0 /Applications/MAMP/htdocs/vicker-backend/website/vendor/laravel/framework/src/Illuminate/Foundation/helpers.php(611): Illuminate\Routing\UrlGenerator->route('boss.index', Array, true, NULL)
#1 /Applications/MAMP/htdocs/vicker-backend/website/storage/framework/views/62bf9c492c618f9f13c8695702e052e1(25): route('boss.index')
#2 /Applications/MAMP/htdocs/vicker-backend/website/vendor/laravel/framework/src/Illuminate/View/Engines/PhpEngine.php(42): include('/Applications/M...')
#3 /Applications/MAMP/htdocs/vicker-backend/website/vendor/laravel/framework/src/Illuminate/View/Engines/CompilerEngine.php(58): Illuminate\View\Engines\PhpEngine->evaluatePath('/Applications/M...', Array)
#4 /Applications/MAMP/htdocs/vicker-backend/website/vendor/laravel/framework/src/Illuminate/View/View.php(147): Illuminate\View\Engines\ in /Applications/MAMP/htdocs/vicker-backend/website/vendor/laravel/framework/src/Illuminate /Routing/UrlGenerator.php on line 306
所以,我跟着堆栈,这是应用程序的缺陷:
Route::get('/', [
'as' => 'boss.index',
'uses' => 'Site\HomeController@index'
]);
/// \Controller\HomeController
public function index( Request $request ) {
$data['press'] = $this->pressRepository->getPress(['home'=>[1],'order'=>'ord','sort'=>'ASC']);
return view('vicker.boss.index',$data);
}
为什么他告诉我路线[boss.index]没有定义?有什么想法吗?
马
答案 0 :(得分:0)
您的代码声明您正在使用此代码:
float element(float** mat,int k, int l, int block_size){
int i_start=k*block_size;
int i_end=(k+1)*block_size-1;
int j_start=l*block_size;
int j_end=(l+1)*block_size-1;
float somma=0;
int c=0;
float media=0;
for(;i_start<=i_end;i_start++){
for(;j_start<=j_end;j_start++){
somma+=mat[i_start][j_start];
c++;
}
}
media=somma/c;
return media;}
Mat* matrixScale(Mat* m, int block_size) {
Mat* new=(Mat*) malloc(sizeof(Mat));
new->rows=m->rows/block_size;
new->cols=m->cols/block_size;
new->row_ptrs=(float**) malloc(new->rows*sizeof(float*));
int i,j,z;
for(z=0;z<new->rows;z++)
new->row_ptrs[z]=(float*) calloc(new->cols,sizeof(float));
for(i=0;i<m->rows;i++){
for(j=0;j<m->cols;j++){
new->row_ptrs[i][j]=elements(m->row_ptrs,i,j,block_size);
}
}
return new;}
但是在您的控制器代码中,您提到:'uses' => 'Site\HomeController@index'
也许,尝试给HomeController提供合适的命名空间:
\Controller\HomeController