Laravel 8 Inline Row Edit Using jQuery Editable Plugin

Reading Time: 5 minutes

Inside this article we will see the concept of inline row data edit in laravel 8. This article will use the jquery editable plugin for inline edit of data records.

We will learn about Laravel 8 inline row edit using jquery editable plugin in a very easy way. It will easy and step by step guide to implement it.

Learn More –

Let’s get started.

Laravel Installation

We will create laravel project using composer. So, please make sure your system should have composer installed. If not, may be this article will help you to Install composer in system.

Here is the command to create a laravel project-

composer create-project --prefer-dist laravel/laravel blog

To start the development server of Laravel –

php artisan serve


Assuming laravel already installed inside your system.

Create Database & Connect

To create a database, either we can create via Manual tool of PhpMyadmin or by means of a mysql command.

CREATE DATABASE laravel_app;

To connect database with application, Open .env file from application root. Search for DB_ and update your details.


Collect Sample Data

When we install laravel setup, you should see a migration file (inside /database/migrations folder) for users table and a model file (inside /app/Models) for it. These files you will get by default after installation.

Run this given command to seed dummy data into users table.

# Open Tinker Shell

$ php artisan tinker

# Run command to seed test data


After seeding test data you will get data something like this –

Create Controller

Back to terminal and run this command to create controller file.

$ php artisan make:controller UserController

It will create UserController.php file inside /app/Http/Controllers folder.

namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Models\User;
class UserController extends Controller
     * Display a listing of the resource.
     * @return \Illuminate\Http\Response
    public function index(Request $request)
        $users = User::paginate(10);
        return view('users', compact('users'));
     * Write code for update
     * @return response()
    public function update(Request $request)
        if ($request->ajax()) {
                    $request->name => $request->value
            return response()->json(['success' => true]);

Create Blade Layout File

Create users.blade.php file inside /resources/views folder.

Open users.blade.php and write this complete code into it.

<!DOCTYPE html>

    <title>Laravel 8 Table Inline Edit Using jQuery editable</title>
    <link rel="stylesheet" href="">
    <script src=""></script>
    <link href="//"
        rel="stylesheet" />
    <script src="//">


    <div class="container">
        <h2 style="text-align: center;">Laravel 8 Table Inline Edit Using jQuery editable</h2>
        <div class="panel panel-primary">
            <div class="panel-heading">Laravel 8 Table Inline Edit Using jQuery editable</div>
            <div class="panel-body">
                <table class="table table-bordered data-table">
                        @foreach ($users as $user)
                                <td>{{ $user->id }}</td>
                                    <a href="" class="update" data-name="name" data-type="text"
                                        data-pk="{{ $user->id }}" data-title="Enter name">{{ $user->name }}</a>
                                    <a href="" class="update" data-name="email" data-type="text"
                                        data-pk="{{ $user->id }}" data-title="Enter email">{{ $user->email }}</a>



<script type="text/javascript">
    $.fn.editable.defaults.mode = 'inline';

        headers: {
            'X-CSRF-TOKEN': '{{ csrf_token() }}'

        url: "{{ route('users.update') }}",
        type: 'text',
        pk: 1,
        name: 'name',
        title: 'Enter name'



Add Routes

Open web.php file from /routes folder. Add these given routes into it.


use App\Http\Controllers\UserController;

Route::get('users', [UserController::class, 'index'])->name('users.index');
Route::post('users', [UserController::class, 'update'])->name('users.update');


Application Testing

Run this command into project terminal to start development server,

php artisan serve


To edit any record, simply click on it. It will open the edit box you can see into image.

We hope this article helped you to learn about Laravel 8 Inline Row Edit Using jQuery Editable Plugin in a very detailed way.

Online Web Tutor invites you to try Skillshike! Learn CakePHP, Laravel, CodeIgniter, Node Js, MySQL, Authentication, RESTful Web Services, etc into a depth level. Master the Coding Skills to Become an Expert in PHP Web Development. So, Search your favourite course and enroll now.

If you liked this article, then please subscribe to our YouTube Channel for PHP & it’s framework, WordPress, Node Js video tutorials. You can also find us on Twitter and Facebook.

Sanjay KumarHello friends, I am Sanjay Kumar a Web Developer by profession. Additionally I'm also a Blogger, Youtuber by Passion. I founded Online Web Tutor and Skillshike platforms. By using these platforms I am sharing the valuable knowledge of Programming, Tips and Tricks, Programming Standards and more what I have with you all. Read more