জন্ম নিবন্ধন করার জন্য আমাদের ইউপি সদস্যের পেছনে ঘুরতে ঘুরতে পায়ের সেন্ডেল ক্ষয়হয়।
TOP FTP Servers in Bangladesh INFO INTERNET-FTP Server Dhaka – FTP Server circleftp.net CircleNetwork Samonline FTP Server Samonline 2 ...
Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.
Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.
Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.
Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.
Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.
জন্ম নিবন্ধন করার জন্য আমাদের ইউপি সদস্যের পেছনে ঘুরতে ঘুরতে পায়ের সেন্ডেল ক্ষয়হয়।
Click File > Preferences > Keyboard Shortcuts:
Search for copyLinesDownAction or copyLinesUpAction in your keyboard shortcuts
Usually it is SHIFT+ALT + ↓
Update for Ubuntu:
It seems that Ubuntu is hiding that shortcut from being seen by VSCode (i.e. it uses it probably by its own). There is an issue about that on GitHub.
In order to work in Ubuntu you will have to define your own shortcut, e.g. to copy the line using ctrl+shift+alt+j and CTRL +SHIFT + ALT + k
composer create-project laravel/laravel=ajax-crud --prefer-dist
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=testing
DB_USERNAME=root
DB_PASSWORD=
php artisan make:migration create_dynamic_field --create=dynamic_fields
This command will make migration file under database/migarations folder. In that file you have to define table column defination details, which you can find below.
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateDynamicField extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('dynamic_fields', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('first_name');
$table->string('last_name');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('dynamic_fields');
}
}
Now we want to migrate above table defination from Laravel application to Mysql database. For this we have to go to command prompt and write following command. This command will make dynamic_fields table under Mysql database.
php artisan migrate
Step 4 - Create Model
For create model under Laravel application, we have to go to command prompt and write following command. This command will make DynamicField.php modal file under app folder.
php artisan make:model DynamicField -m
In app/DynamicField.php file we have to define table column name on which we need for database operation.
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class DynamicField extends Model
{
protected $fillable = [
'first_name', 'last_name'
];
}
Step 5 - Create Controller
Controller is the heart of Laravel 5.8 application because it has handle all http request. First we want to make controller, so we have to go to command prompt and write following command. It will make DynamicFieldController.php file under app/Http/Controllers folder.
php artisan make:controller DynamicFieldController
In this controller file you can see below in which we have add two statement in the header. First is use App\DynamicField is for use DynamicField.php modal file use here and second Validator is for use Laravel validator class for validate form data. In this controller we have make two method which you can see below.
index() - This is root method of this controller and it will load dynamic_field.blade.php file on web browser as an output.
insert() - This method has received ajax request for insert multiple data. Under this method first it has validate multiple form data of same name. So, here question aris how to validate multiple form data of same name in Laravel , so here we have add * sign with input field name, which has been used when we have validate multiple form data of the same name in Laravel application. If suppose there is any form validation error has been occur then it will send validation error to ajax request in JSON format by using response() method. But suppose there is no any validation error occur then it will continue execute. After this there one more question aris how to insert multiple data in Laravel 5.8 application. So here we have store multiple data in local variable in array format and by using insert() method of modal class, it will insert or save multiple data in Laravel application.<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\DynamicField;
use Validator;
class DynamicFieldController extends Controller
{
function index()
{
return view('dynamic_field');
}
function insert(Request $request)
{
if($request->ajax())
{
$rules = array(
'first_name.*' => 'required',
'last_name.*' => 'required'
);
$error = Validator::make($request->all(), $rules);
if($error->fails())
{
return response()->json([
'error' => $error->errors()->all()
]);
}
$first_name = $request->first_name;
$last_name = $request->last_name;
for($count = 0; $count < count($first_name); $count++)
{
$data = array(
'first_name' => $first_name[$count],
'last_name' => $last_name[$count]
);
$insert_data[] = $data;
}
DynamicField::insert($insert_data);
return response()->json([
'success' => 'Data Added successfully.'
]);
}
}
}
Step 6 - Create View file
In this post we have create dynamic_field.blade.php file under resources/views folder. Under this file for generate dynamic input field we have use jQuery code. By using jQuery here it will dynamically generate html input fields. For submit form data here we have use Ajax request, by using ajax request it will send form data to controller method.
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Laravel 5.8 - DataTables Server Side Processing using Ajax</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js"></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" />
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
</head>
<body>
<div class="container">
<br />
<h3 align="center">Dynamically Add / Remove input fields in Laravel 5.8 using Ajax jQuery</h3>
<br />
<div class="table-responsive">
<form method="post" id="dynamic_form">
<span id="result"></span>
<table class="table table-bordered table-striped" id="user_table">
<thead>
<tr>
<th width="35%">First Name</th>
<th width="35%">Last Name</th>
<th width="30%">Action</th>
</tr>
</thead>
<tbody>
</tbody>
<tfoot>
<tr>
<td colspan="2" align="right"> </td>
<td>
@csrf
<input type="submit" name="save" id="save" class="btn btn-primary" value="Save" />
</td>
</tr>
</tfoot>
</table>
</form>
</div>
</div>
</body>
</html>
<script>
$(document).ready(function(){
var count = 1;
dynamic_field(count);
function dynamic_field(number)
{
html = '<tr>';
html += '<td><input type="text" name="first_name[]" class="form-control" /></td>';
html += '<td><input type="text" name="last_name[]" class="form-control" /></td>';
if(number > 1)
{
html += '<td><button type="button" name="remove" id="" class="btn btn-danger remove">Remove</button></td></tr>';
$('tbody').append(html);
}
else
{
html += '<td><button type="button" name="add" id="add" class="btn btn-success">Add</button></td></tr>';
$('tbody').html(html);
}
}
$(document).on('click', '#add', function(){
count++;
dynamic_field(count);
});
$(document).on('click', '.remove', function(){
count--;
$(this).closest("tr").remove();
});
$('#dynamic_form').on('submit', function(event){
event.preventDefault();
$.ajax({
url:'{{ route("dynamic-field.insert") }}',
method:'post',
data:$(this).serialize(),
dataType:'json',
beforeSend:function(){
$('#save').attr('disabled','disabled');
},
success:function(data)
{
if(data.error)
{
var error_html = '';
for(var count = 0; count < data.error.length; count++)
{
error_html += '<p>'+data.error[count]+'</p>';
}
$('#result').html('<div class="alert alert-danger">'+error_html+'</div>');
}
else
{
dynamic_field(1);
$('#result').html('<div class="alert alert-success">'+data.success+'</div>');
}
$('#save').attr('disabled', false);
}
})
});
});
</script>
Step 7 - Set Route
In Laravel , we need to set route of all controller method which we have make. For this we have to open routes/web.php file and define following code for set route.
Route::get('dynamic-field', 'DynamicFieldController@index');
Route::post('dynamic-field/insert', 'DynamicFieldController@insert')->name('dynamic-field.insert');
Step 8 - Run Laravel application
For run Laravel application, we have to go to command prompt and write following command. This command will start Laravel application and give you base url of your Laravel 5.8 application.
php artisan serve
For check output in browser you have to write following url in your browser tab.
http://127.0.0.1:8000/dynamic-field
When you become a student of a particular university or college, you will have a .edu email account with your name, for example, your-name@mit.edu. But if you are not a student and want a free .edu email then this article is for you. And yes, this method is 100% free and working (Last tested on 13 December 2019)
Full Name
|
Mary N Morey
|
Gender
|
female
|
Title
|
Mrs.
|
Race
|
Black
|
Birthday
|
11/16/1957
|
Social Security Number
|
306-90-8491
|