Other functions in the controller are working fine but the error shows up when I try to call this function.
I have checked through all the related posts but couldn't solve my problem.
Class App\Http\Controllers\StudentController does not exist in Laravel 5
The controller
<?php
namespace App\Http\Controllers;
use Illuminate\Support\Facades\DB;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use App\Http\Controllers\Controller;
use Illuminate\Support\Facades\App;
use Illuminate\Support\Facades\Session;
use Illuminate\Support\Facades\URL;
use Illuminate\Support\Facades\Mail;
use App\Http\Controllers\CommonController;
use DateTime;
use Dompdf\Dompdf;
use Validator;
class DeliveryController extends Controller{
public function __construct()
{
$this->middleware('auth');
}
//codes
//The function in the controller
public function fetchItemList($formId)
{
//codes
return response()->json(['Item' => $item]);
}
routes.php
Route::get('fetchItemList/{id}', 'Api\DeliveryController@fetchItemList');
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire