Monday, January 6, 2020
Display image and href from database in Vue js & Javascript datatable
# You can do it :
Vue Js :
passport_nid: {
label: 'NID',
render: (data,type,row) => { return '<img src=" '+ base_url+' '+"uploads/"+' '+"nid_image_folder/" + ' '+row.passport_nid+' " alt="" class="imageSize" width="70px">'}
},
JavaScript :
Ex:01 .html('<img src="'+{{URL::asset('uploads/studentPhoto/')}}+' '+value.photo+'" width="200px;" height="200px">')
Ex:02
var url ='{{url("/privilege")}}';
$("#my_country").html('<a href="'+url+'" title="Become a VIP">VIP Privileges</a>');
Wednesday, January 1, 2020
Laravel Module (nwidart/laravel-modules) package Artisan command
Step:01
#To install through Composer, by run the following command:
Step:02
#By default the module classes are not loaded automatically. You can autoload your modules using psr-4. For example :
{
"autoload": {
"psr-4": {
"App\\": "app/",
"Modules\\": "Modules/"
}
}
}
Step:03
#Tip: don't forget to run composer dump-autoload afterwards
Step:04
Module Artisan Command:
#To install through Composer, by run the following command:
- composer require nwidart/laravel-modules
- php artisan vendor:publish --provider="Nwidart\Modules\LaravelModulesServiceProvider"
Step:02
#By default the module classes are not loaded automatically. You can autoload your modules using psr-4. For example :
{
"autoload": {
"psr-4": {
"App\\": "app/",
"Modules\\": "Modules/"
}
}
}
Step:03
#Tip: don't forget to run composer dump-autoload afterwards
Step:04
Module Artisan Command:
- php artisan module:make Blog
- php artisan module:make-migration create_posts_table Blog
- php artisan module:migrate Blog
- php artisan module:seed Blog
- php artisan module:make-controller PostsController Blog
- php artisan module:make-model Post Blog
- php artisan module:make-provider BlogServiceProvider Blog
- php artisan module:make-request CreatePostRequest Blog
Subscribe to:
Posts (Atom)
Ajax load lage with laravel.
step-1: HTML <div class="row"> <div class="col-lg-12"> <d...
-
<template > <tr v-for="(item, i) in list"> <td :rowspan="item.same_num" ...
-
HTML: @foreach($user-> as $key => $row) <tr class="{{$row->id}}"> ...
-
HTML <select class="form-control" data-selectField="sales_invoices_customer_id" id="sales_invoices_customer_id...