skip to Main Content

How to redirect a route prefix to another route in laravel? – Apache

I am using laravel 5.7. Please see my code: web.php Route::prefix('admin')->group(function () { Route::get('/', function () { return redirect()->route('admin.check'); }); Route::get('/check-auth', 'AdminAdminController@checkAuth')->name('admin.check'); }); AdminController::checkAuth() public function checkAuth() { if(true == Auth::guard('admin')->user()){ return redirect()->route('cs.dashboard'); } else{ return redirect()->route('admin.login'); } } I…

VIEW QUESTION

Laravel API routes not working with Postman

My route/api.php has these routes: Route::post('/signup' , 'UserApiController@signup'); Route::post('/logout' , 'UserApiController@logout'); Route::post('/verify' , 'UserApiController@verify'); but when I'm trying to access from Postman like this, it shows object not found: localhost/my_webiste/api/signup here the userapicontroller signup function: public function signup(Request $request) {…

VIEW QUESTION

Facebook marketing API insights (Destination url)

I'm trying to get data using Facebook Marketing API. $api = FacebookAds::init('TOKEN'); $start = Carbon::create(2018,11,16); $end = Carbon::create(2018,11,16); $period = Period::create($start,$end); $in = $api->insights($period,'act_ID', 'ad',[ 'fields' => ['impressions', 'objective', 'actions'....] ]); I'm getting each ad actions like this: "actions" =>…

VIEW QUESTION
Back To Top
Search