Category : redirect

I have a domain: www.example.com My Laravel 8 Production Project is setup to "force" SSL on the URL. I have set this up as follows: public/.htaccess #SSL force RewriteEngine On RewriteCond %{HTTPS} !on RewriteRule ^.*$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] and app/Providers/AppServiceProvider public function boot() { if($this->app->environment(‘production’)) { URL::forceScheme(‘https’); } } my .env file APP_NAME=NameOfApp APP_ENV=production APP_KEY=*hidden* APP_DEBUG=false ..

Read more

How can I redirect this page to the next page without clicking the button image? Image: static.liqpay.ua/buttons/p1%s.radius.png public function cnb_form($params) { $language = ‘en’; if (isset($params[‘language’]) && $params[‘language’] == ‘en’) { $language = ‘en’; } $params = $this->cnb_params($params); $data = $this->encode_params($params); $signature = $this->cnb_signature($params); return sprintf(‘ <form method="POST" action="%s" accept-charset="utf-8"> %s %s <input type="image" src="//static.liqpay.ua/buttons/p1%s.radius.png" ..

Read more

I have created a login page in laravel 8. Everything works perfect but when it comes to redirect to dashboard.. It returns true in network(Inspect) but page is not redirecting… Here is logon function code below: // logIn function LogIn(Request $req) { $userInfo = DB::table(‘users’)->where(‘id’,’=’, $req->user_id)->first(); if(!$userInfo) { return false; } else{ if($userInfo->password == $req->password) ..

Read more

I have created a login page in Laravel 8. Everything works perfect but when it comes to redirecting to the dashboard. It returns true in debugging but not reaching the correct page. Here is login function code below: // logIn function LogIn(Request $req) { $userInfo = DB::table(‘users’)->where(‘id’,’=’, $req->user_id)->first(); if(!$userInfo) { return false; } else { ..

Read more

I have Laravel installed in public_html folder and I have a subdomain x.example.com when I open it, I get This site can’t be reached and when I navigate to example.com/x it worked. How to make the subdomain point or map to this path and ignore Laravel routing? I tried RewriteCond %{HTTP_HOST} ^x.example.com RewriteCond %{REQUEST_URI} !^/x/ ..

Read more

Iam new in laravel and i want to redirect to rout (dashboard) after login, can i make it ? iam tried many of methods but not work with me this RedirectIfAuthenticated.php file <?php namespace AppHttpMiddleware; use Closure; use Request; use AppProvidersRouteServiceProvider; use IlluminateSupportFacadesAuth; class RedirectIfAuthenticated { /** * Handle an incoming request. * * @param ..

Read more

I’m try to make redirect page with slug if have activity to page activity and if news redirect to news page. but when i make if else in foreach cannot. this my controller $term = request(‘search’); $results = Search::add(activity::class, ‘title’,’activity’, ‘district’) ->add(news::class, ‘title’,’body’) ->beginWithWildcard() ->get($term); return view(‘/search’,[ **’search’ => $results,** ‘term’ => $term, ]); } ..

Read more

I am trying to make an update process using two livewire controller. I want to pass the id of the selected page and pass that data to another livewire controller. I’ve tried to use: return redirect()->route(‘system-pages/update-system-page’, [‘pages_id’ => $this->modelId]); to pass the data to the url in which the $this->modelId is the id of the ..

Read more

I have the home page in web.php the login page: Route::get(‘/’, function () { return view(‘auth.login’); }); And when the user logs in the authenticated page: Route::middleware([‘auth:sanctum’, ‘verified’])->get(‘/admin’, function () { return view(‘admin.index’); })->name(‘panel’); The problem is that if I manually type in the url of the browser, the main page appears the login page ..

Read more

I have the home page in web.php the login page: Route::get(‘/’, function () { return view(‘auth.login’); }); And when the user logs in the authenticated page: Route::middleware([‘auth:sanctum’, ‘verified’])->get(‘/admin’, function () { return view(‘admin.index’); })->name(‘panel’); The problem is that if I manually type in the url of the browser, the main page appears the login page ..

Read more

I have page that i reach it from post route : Route::post(‘/daily’, [AppHttpControllersAdminController::class, ‘daily’])->name(‘daily’); in this page i have icon which have action of update data by get method : <td class="text-center notforprint"> <a href="{{route(‘abs_action’,["id"=>$item->id,"action"=>’edit’,’date’=>$absences[0]->date,’stage’=>$stage,’group’=>$absences[0]->group])}}"><i class="fas fa-check-circle"></i></a></td> in ‘abs_action’ controller I update data and want return back to same page with array that the page ..

Read more