Redirect Invoice Download to invoice view

This commit is contained in:
Deon George 2021-09-29 17:36:55 +10:00
parent 7acb9e964b
commit 5be4fe6784
No known key found for this signature in database
GPG Key ID: 7670E8DC27415254
2 changed files with 6 additions and 9 deletions

View File

@ -22,11 +22,6 @@ use App\Models\{Invoice,Service,User};
*/ */
class HomeController extends Controller class HomeController extends Controller
{ {
public function __construct()
{
$this->middleware('auth');
}
/** /**
* Logged in users home page * Logged in users home page
* *
@ -101,7 +96,7 @@ class HomeController extends Controller
abort(404); abort(404);
} }
return $this->invoice_pdf($o); return $this->invoice($o);
} }
/** /**
@ -122,9 +117,11 @@ class HomeController extends Controller
* @param Service $o * @param Service $o
* @param string $status * @param string $status
* @return \Illuminate\Http\RedirectResponse * @return \Illuminate\Http\RedirectResponse
* @deprecated
*/ */
public function service_progress(Service $o,string $status) public function service_progress(Service $o,string $status)
{ {
abort(500,'deprecated');
return redirect()->to($o->action($status) ?: url('u/service',$o->id)); return redirect()->to($o->action($status) ?: url('u/service',$o->id));
} }
} }

View File

@ -103,9 +103,9 @@ Route::group(['middleware'=>['theme:adminlte-be','auth'],'prefix'=>'u'],function
// Doorman Code Routes // Doorman Code Routes
Route::group(['middleware'=>['theme:adminlte-be'],'prefix'=>'u'],function() { Route::group(['middleware'=>['theme:adminlte-be'],'prefix'=>'u'],function() {
// Route::get('invoice/{o}/email/{code}','UserHomeController@invoice_pdf_email') Route::get('invoice/{o}/email/{code}',[HomeController::class,'invoice_pdf_email'])
// ->where('o','[0-9]+') ->where('o','[0-9]+')
// ->where('code','[0-9A-Z]{6}'); ->where('code','[0-9A-Z]{6}');
}); });
// Frontend Routes (Non-Authed Users) // Frontend Routes (Non-Authed Users)