News Articles laravel

How to show laravel api error in digitalocean?

I deploy my Laravel + vue project on the Digitalocean apps and some of my api are working but some are not. When I look into the api response I received message: "Server Error", But the api is working on localhost and gives error after the deployment. Is there a way to view the actual […]

Call post to vue with laravel error 419 csrf-token

I´m working in a project with Laravel and I implement Vue to make asynchronous task. My problem is that Laravel use in post methos csrf token protection and I don´t how to pass this token to the javascript call. How can I do it ? <header id="heading" > <meta name="csrf-token" content="{{ csrf_token() }}"> <h1 class="text-center">Preparación […]

progress bar with bootstrap, ajax laravel

i´m traying to create a progress bar while upload file and import data in database. i has created a importer with laravel and ajax with jquery. in this imported i´m reading all data from CSV file i´m getting all rows and cols from this file and while i´m reading this file, i´m doing a insert […]

progress bar with bootstrap, ajax laravel

i´m traying to create a progress bar while upload file and import data in database. i has created a importer with laravel and ajax with jquery. in this imported i´m reading all data from CSV file i´m getting all rows and cols from this file and while i´m reading this file, i´m doing a insert […]

progress bar with bootstrap, ajax laravel

i´m traying to create a progress bar while upload file and import data in database. i has created a importer with laravel and ajax with jquery. in this imported i´m reading all data from CSV file i´m getting all rows and cols from this file and while i´m reading this file, i´m doing a insert […]

progress bar with bootstrap, ajax laravel

i´m traying to create a progress bar while upload file and import data in database. i has created a importer with laravel and ajax with jquery. in this imported i´m reading all data from CSV file i´m getting all rows and cols from this file and while i´m reading this file, i´m doing a insert […]

progress bar with bootstrap, ajax laravel

i´m traying to create a progress bar while upload file and import data in database. i has created a importer with laravel and ajax with jquery. in this imported i´m reading all data from CSV file i´m getting all rows and cols from this file and while i´m reading this file, i´m doing a insert […]

Laravel Breeze Vue – Link and page not rendering

I working on an app and using Laravel Breeze Vue for the first time. Just some quick background, Laravel Breeze provides some quick scaffolding for authentication. When a user logs in, they are presented with a simple dashboard page. I have added a new link to this page as per below. app/resources/js/Layouts/Authenticated.vue <!– Navigation Links […]

Foreach Condition with Ajax form submit button

I was trying to do for each condition for form but for some reason, it is submitting all foreach data with ajax. @foreach($response[‘Types’] as type) <div class="option option-two"> <div class="upper"> <p style="font-size: 2em;font-weight: bold">${{ number_format($type[‘price’][‘subTotal’],2)}}</p> <p style="font-weight: bold">Per Day Parking</p> </div> <div class="form"> <form name="{{$type[‘id’]}}" method="post" class="reds"> @CSRF {{–<input type=hidden name=LotId value="{{ json_encode($response, true) }}">–}} […]

Adding and deleting VueJS form input

i am new to vue js, i have one "iban" entry that I want to do and when "add iban" button is clicked, first entry "delete" range should be added and when I want to delete it starts from above, I think I made a mistake. Thanks already for your help. <template> <div class="col-12" v-for="(section, […]

ErrorException Creating default object from empty value in Laravel

While updating my table data I have just got this error again after again. This is "ErrorException Creating default object from empty value"…..how can i solve this…….. here is my code given below…….. AdminController.php……. public function update(Request $r,$post_id){ $post=Post::find($post_id); $post->post_title=$r->post_title; $post->post_image=$r->post_image; $post->post_details=$r->post_details; $post->post_rating=$r->post_rating; $post->id=$r->id; $post->save(); return back(); } My Resource Route……… Route::resource(‘post’,AdminController::class); Blade File: <form […]

Handle OTP Auth via your own source code

Laravel OTP AUTH This package allows you to authenticate with one time password access (OTP). https://github.com/cuongnd88/otp-auth Example Usage: Route::get(“/notify”, function(){ return AppModelsUser::find(1)->notify(new AppAuthenticationSendOtp(‘mail’, 4, 10)); }); Route::get(“/auth-otp/{otp}”, function(){ return AppModelsUser::authByOtp(request()->otp, ‘84905279285’); }); Route::get(“/check-otp/{otp}”, function(){ return AppModelsUser::find(1)->checkOtp(request()->otp); }); Contents Installation Usage Generate OTP Verify OTP Basic identification Demo Credits Installation 1- Add the package to your […]

How can I work with React in a Laravel project?

I started a fresh Laravel project and re-scaffolded it to use React instead of Vue. I have another developer that will be coding the React, but I will be responsible for the Laravel/backend code. I have a few questions. Does React work within blade templates? How do routes in Laravel work if we are using […]

frontend pages are blank in laravel and vuejs app

I am working on a laravel and vue.js web app. Everything is working fine with no error. But the front end vue pages are not working. They are blank. I inspected the page and found this error under console tab: main.js:8577 Uncaught Error: Cannot find module ‘bootstrap-vue’ at webpackMissingModule (main.js:8577) at main.js:8577 at main.js:8658 at […]

Vue-Router display component twice with warning on console and infinite request on network

Am using vue-router in my project with vue3 and laravel 8. Am using vue-router to link my vue component. But when I log first, I have my component that appear, but still with the login page : If I refresh the page I have my component that is displayed twice : The "test" button is […]

Ajax requests are really slow in Laravel

I started developing in Laravel lately and I want to build a simple webshop. For some functionalities I want to use Ajax for the better experience. I made an Add to cart button on every product page. It sends the product id (and the CSRF token too) to the controller, which sends back only a […]

As a full stack developer on AMP(Apache,Mysql,PHP) Stack with JS(Vue). want to know the Life Cycle of the each technology in details

What is the lifecycle of php? What is the lifecycle of javascript? What is the lifecycle of vue js? What is the lifecycle of laravel? I have found these question but they are scatter on the web. A details oriented Answer which is easy to grasp for a novice like me would be very helpful. […]

[Vue warn]: Error in render: "TypeError: visitor.messages is undefined"

I request your help with the following issue I have a parent table in laravel I am able to access the data of its child in vuejs i.e the parent table visits and its child is messages so to access the messages for each visit, first I am looping through the visits and each visit […]

Sitemap | Terms | Privacy | Cookies | Advertising

Senior Software Developer

Creator of @LzoMedia I am a backend software developer based in London who likes beautiful code and has an adherence to standards & love's open-source.