skip to Main Content

Laravel – How to show console messages inside of import class?

In my console command I call ImportQuizApiData method : use AppLibraryImportQuizApiData; ... class ImportQuizApiDataCommand extends Command { protected $signature = 'app:import-quiz-api-data-command {categoryName?}'; public function handle() { ... $importQuizApiData = new ImportQuizApiData(); $importQuizApiData->setParentCommand($this); $importResult = $importQuizApiData->import(); ... Inside of import method…

VIEW QUESTION

How to use chartjs-plugin-zoom in laravel

I am trying to use the functionality of chartjs-plugin-zoom in my laravel application but I cant't get it to work. In the blade I am loading the plugin through Cloudflare cdnjs: <script src="https://cdnjs.cloudflare.com/ajax/libs/hammer.js/2.0.8/hammer.min.js" integrity="some-long-string" crossorigin="anonymous" referrerpolicy="no-referrer"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/chartjs-plugin-zoom/2.0.1/chartjs-plugin-zoom.min.js" integrity="some-other-long-string" crossorigin="anonymous"…

VIEW QUESTION

Laravel – The GET method is not supported for route produk/index. Supported methods: POST

My error The GET method is not supported for route produk/index. Supported methods: POST. Route::post('/produk/index', [ProdukController::class,'index'])->name('produk.index'); web.php <?php use IlluminateSupportFacadesRoute; use AppHttpControllersLoginController; use AppHttpControllersProdukController; use AppHttpControllersSupplierController; /* |-------------------------------------------------------------------------- | Web Routes |-------------------------------------------------------------------------- | | Here is where you can register…

VIEW QUESTION

How to force Cache Headers in Laravel

I have a file which I call through the route like this: Route::group([ 'middleware' => ['cache.headers:public;max_age=600'], ], function () { Route::get('/my-file', function ($locale) { //some logic $contents = 'my file content'; $response = Response::make($contents, 200); $response->header('Cache-Control', 'public, max-age=600'); $response->header('Expires', now()->addSeconds(600)->toRfc7231String());…

VIEW QUESTION

Laravel Flash Message not displaying message

I was to trying to show flash message with following controller. But it's not displaying any message on view page. public function deleteTag(Request $request) { DB::table('tags') ->where('id', $request->id) ->where('user_id', Auth::user()->id) ->delete(); Session::flash('error', 'Tag deleted successfully' ); return redirect('tags'); } In…

VIEW QUESTION
Back To Top
Search