Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/sorting/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 如何使用centos服务器查看我对laravel的看法_Php_Laravel 5_Centos6 - Fatal编程技术网

Php 如何使用centos服务器查看我对laravel的看法

Php 如何使用centos服务器查看我对laravel的看法,php,laravel-5,centos6,Php,Laravel 5,Centos6,我在文件夹/var/www/html/myproject中有我的laravel项目,当我在浏览器示例中键入路由时:127.0.0.2/api/v1/cuentas(因为我使用公共IP)我看不到我的视图,它会穿透我 Not Found The requested URL /api/v1/cuentas was not found on this server. Apache/2.2.15 (CentOS) Server at (ip) Port 80 cuentas文件是php 我设置了权限

我在文件夹
/var/www/html/myproject
中有我的laravel项目,当我在浏览器示例中键入路由时:
127.0.0.2/api/v1/cuentas
(因为我使用公共IP)我看不到我的视图,它会穿透我

Not Found
The requested URL /api/v1/cuentas was not found on this server.
Apache/2.2.15 (CentOS) Server at (ip) Port 80
  • cuentas
    文件是php
  • 我设置了权限
我的路线:

Route::group(array('prefix' => 'api/v1'), function()
{
    Route::resource('cuentas','cuentaPruebaController');
}); 
我的控制器:

<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;

use App\Http\Requests;

use App\cuentum;

class cuentaPruebaController extends Controller
{
    public function index() {
        try {

            $response = [
                'cuentas' => []
            ];
            $statusCode = 200;
            $cuenta = \App\cuentum::all();

            foreach ($cuenta as $item) {

                $response['cuentas'][] = [
                    'id_cuenta' => $item->id_cuenta,
                    'nombre' => $item->nombre,
                    'apellido' => $item->apellido,
                    'ci' => $item->ci,
                    'domicilio' => $item->domicilio,
                    'telefono' => $item->telefono,
                    'dispositivo_id' => $item->dispositivo_id,
                    'estado' => $item->estado,
                ];
            }
        } catch (Exception $e) {
            $statusCode = 404;
        } finally {
            return \Response::json(array($response, $statusCode));
        }
    }
 }

什么是
帐户
文件?控制器?是…是控制器请共享控制器和路由。php问题已更新。感谢您的时间。使用
php artisan route:list
,这将为您提供可用的路由列表。检查这些并在此处共享什么是
帐户
文件?控制器?是…是控制器请共享控制器和路由。php问题已更新。感谢您的时间。使用
php artisan route:list
,这将为您提供可用的路由列表。检查这些并在这里分享