Author: admin

How to post array of data to the server in your Vue app

When you develop the Vue application you will have to post array of data to the REST API url given to you Suppose you are going to make a invoice with several products as shown in the following HTML code and you want to post request with this array of data via Axios Product Name […]

Read more

Props in component in Vue.js

Props in Vue is used to pass data from Parent elements to child element. We will see how it works in this article Component is useless if you are unable to pass data externally This component does not have access to the data element in parent Vue instance. You can understand it with following example […]

Read more

Get next id in auto generated field in Laravel

You can use the following code to get the next id of the auto generated field of the table in Laravel,

Read more

Redirect to specified route after logout – Laravel

Redirect after logout In default Laravel app, once you logout it will redirect to the home page. But you can change where to redirect after you log out. Never edit the core files located at your vendor folder that will override when you update the Laravel versions In Auth\LoginController you have the following trait You […]

Read more

Laravel Gate::define easy code

You can us the following code define your all gates. Permission table has got the control name,action and models

Read more

Fetch select fields on a hasMany relation

https://stackoverflow.com/questions/30022038/fetch-specific-fields-on-a-hasmany-relation

Read more

Set Selected on Select Form Control in Laravel

In your blade file, you have to set the select option when you are in edit mode. You need to get output like this To get the above output you can use the following code

Read more

Laravel- Call function of a Model in a blade file

You have a category.blade.php file and you want to call a function name someFunc() inside the Category model Inside your category.blade.php you can call the function {{$model->someFunc()}}

Read more

Laravel like in Eloquent

If you want to run query with Like statement using Eloquent you can follow the following example

Read more

Drag and Drop

Drag and drop with Vanila Js https://alligator.io/js/drag-and-drop-vanilla-js Drag and Drop starting tutorial. This is good starting point if you are a beginner for Drab ad Drop in browser window

Read more