I have some problem with the controller. In my local repo as I serve
the project it works!
route: at web.php
Route::get('/jobs', 'one\jobs\JobsController@index');
But as I tried at my company's server it didn't work! It says controller does not exist. I've compared the controller and web route but it is the same with my local one.
And here is my controller:
App\Http\Controllers\one\Jobs\JobsController;
<?php
namespace App\Http\Controllers\one\Jobs;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use App\Library\One\ApiLibrary;
use Alert;
class JobsController extends Controller
{
public function __construct()
{
$this->apiLib = new ApiLibrary;
}
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index(Request $request)
{
$token = $request->session()->get('token');
$put['data'] = ['token' => $token];
$this->apiLib->setParams($put['data']);
$result = $this->apiLib->generate('GET','/api/jobs');
if(!empty($result->status))
{
$data = $result->data;
$action = $result->action->original;
return view('one.jobs.jobsList',compact('data', 'action'));
}else{
$err_messages = "Server Error";
return view('one.errors.errors', compact('err_messages'));
}
}
}
got any idea how to fix this? Thanks in advance!