sekar_r24

sekar_r24

Member Since 1 Month Ago

Experience Points
690
Total
Experience

4,310 experience to go until the next level!

In case you were wondering, you earn Laracasts experience when you:

  • Complete a lesson — 100pts
  • Create a forum thread — 50pts
  • Reply to a thread — 10pts
  • Leave a reply that is liked — 50pts
  • Receive a "Best Reply" award — 500pts
Lessons Completed
1
Lessons
Completed
Best Reply Awards
0
Best Reply
Awards
  • start your engines Created with Sketch.

    Start Your Engines

    Earned once you have completed your first Laracasts lesson.

  • first-thousand Created with Sketch.

    First Thousand

    Earned once you have earned your first 1000 experience points.

  • 1-year Created with Sketch.

    One Year Member

    Earned when you have been with Laracasts for 1 year.

  • 2-years Created with Sketch.

    Two Year Member

    Earned when you have been with Laracasts for 2 years.

  • 3-years Created with Sketch.

    Three Year Member

    Earned when you have been with Laracasts for 3 years.

  • 4-years Created with Sketch.

    Four Year Member

    Earned when you have been with Laracasts for 4 years.

  • 5-years Created with Sketch.

    Five Year Member

    Earned when you have been with Laracasts for 5 years.

  • school-in-session Created with Sketch.

    School In Session

    Earned when at least one Laracasts series has been fully completed.

  • welcome-newcomer Created with Sketch.

    Welcome To The Community

    Earned after your first post on the Laracasts forum.

  • full-time-student Created with Sketch.

    Full Time Learner

    Earned once 100 Laracasts lessons have been completed.

  • pay-it-forward Created with Sketch.

    Pay It Forward

    Earned once you receive your first "Best Reply" award on the Laracasts forum.

  • subscriber Created with Sketch.

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • lifer Created with Sketch.

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • evangelist Created with Sketch.

    Laracasts Evangelist

    Earned if you share a link to Laracasts on social media. Please email [email protected] with your username and post URL to be awarded this badge.

  • chatty-cathy Created with Sketch.

    Chatty Cathy

    Earned once you have achieved 500 forum replies.

  • lara-veteran Created with Sketch.

    Laracasts Veteran

    Earned once your experience points passes 100,000.

  • 10k-strong Created with Sketch.

    Ten Thousand Strong

    Earned once your experience points hits 10,000.

  • lara-master Created with Sketch.

    Laracasts Master

    Earned once 1000 Laracasts lessons have been completed.

  • laracasts-tutor Created with Sketch.

    Laracasts Tutor

    Earned once your "Best Reply" award count is 100 or more.

  • laracasts-sensei Created with Sketch.

    Laracasts Sensei

    Earned once your experience points passes 1 million.

  • top-50 Created with Sketch.

    Top 50

    Earned once your experience points ranks in the top 50 of all Laracasts users.

Level 1
690 XP
Sep
14
1 week ago
Activity icon

Replied to Image From S3 Bucket, Displayed In Frame, Updated By Changing The Drop Down

could you help on this? my image tag



            <div class="row">
            <img id="image1" src="{{ Storage::disk('s3')->url('images/ACM 19WG-500x500.jpg') }}"/>
            <select id="CarList1">
                <option value="images/ACM 19WG-500x500">ACM 19WG-500x500</option>
                <option value="images/ACM102 D v2-500x500">ACM102 D v2-500x500</option>

            </select>

my js

 var changeCarImage1 = function() {
                document.getElementById('image1').src = "{{ Storage::disk('s3')->url(" + this.options[this.selectedIndex].value + ".'jpg')}}" 
            }

                     
            var carList1 = document.getElementById('CarList1');
            carList1.addEventListener('change', changeCarImage1, false);

somewhere i am doing mistake, the drop down works, but the image is not displayed!

Anyone could help?

Sep
13
1 week ago
Activity icon

Replied to How To Add 7 Days To Current Date In Blade.

Thanks for the alternative suggestion

Activity icon

Replied to How To Add 7 Days To Current Date In Blade.

Thanks a lot, works like charm!

Activity icon

Started a new Conversation How To Add 7 Days To Current Date In Blade.

hi.,

i have field in the date format in blade file as follows.

<input type =" date" value="{{ date('Y-m-d') }}" >

i would like to add 7 days to the current date in the same field?

how this can be done?

Activity icon

Replied to Current Date In Laravel

hi., how to increment the date, by say 10 days plus from the current date

Sep
12
1 week ago
Activity icon

Replied to Php Artisan Migrate Ran Successfully But Doe Not Create Tables

did u checked via pgadmin4, whether the table exists with the columns for the particular database with select * from tablename; query?

what is the schema for the tables? Could you able to share.

Activity icon

Replied to Image Not Showing In Laravel 7

does the route, controller everything defined correctly, seems you are using a post request.

if you just want to display an image instead of images( where i had stored),use posts.

Could you brief more, how the process works

Activity icon

Replied to Image Not Showing In Laravel 7

img src="{{asset("storage/images/Filename.png")}}"

this works for me,

where the images are stored.?

Activity icon

Replied to Image From S3 Bucket, Displayed In Frame, Updated By Changing The Drop Down

Hi,

From the local folder i can able to list in the drop down . but for the s3 bucket how to do that? could you point from reference links or workaround for this! Thanks

Sep
07
2 weeks ago
Activity icon

Started a new Conversation Image From S3 Bucket, Displayed In Frame, Updated By Changing The Drop Down

Hi,

I would like to list down the image file name in a drop down. When the user selects the particular value from the drop down list, the frame has to display the respective image from the s3 bucket.

Could some one through idea on how this can be achieved?

Thanks

Aug
27
3 weeks ago
Activity icon

Replied to Auto Update Of Date Field In Laravel

Hi Shows the following error

SQLSTATE[22007]: Invalid datetime format: 7 ERROR: invalid input syntax for type date: "1"

I am using postgres

Activity icon

Replied to Auto Update Of Date Field In Laravel

hi.,

the config/database.php

<?php

use Illuminate\Support\Str;

return [

    /*
    |--------------------------------------------------------------------------
    | Default Database Connection Name
    |--------------------------------------------------------------------------
    |
    | Here you may specify which of the database connections below you wish
    | to use as your default connection for all database work. Of course
    | you may use many connections at once using the Database library.
    |
    */

    'default' => env('DB_CONNECTION', 'mysql'),

    /*
    |--------------------------------------------------------------------------
    | Database Connections
    |--------------------------------------------------------------------------
    |
    | Here are each of the database connections setup for your application.
    | Of course, examples of configuring each database platform that is
    | supported by Laravel is shown below to make development simple.
    |
    |
    | All database work in Laravel is done through the PHP PDO facilities
    | so make sure you have the driver for your particular database of
    | choice installed on your machine before you begin development.
    |
    */

    'connections' => [

        'sqlite' => [
            'driver' => 'sqlite',
            'url' => env('DATABASE_URL'),
            'database' => env('DB_DATABASE', database_path('database.sqlite')),
            'prefix' => '',
            'foreign_key_constraints' => env('DB_FOREIGN_KEYS', true),
        ],

        'mysql' => [
            'driver' => 'mysql',
            'url' => env('DATABASE_URL'),
            'host' => env('DB_HOST', '127.0.0.1'),
            'port' => env('DB_PORT', '3306'),
            'database' => env('DB_DATABASE', 'forge'),
            'username' => env('DB_USERNAME', 'forge'),
            'password' => env('DB_PASSWORD', ''),
            'unix_socket' => env('DB_SOCKET', ''),
            'charset' => 'utf8mb4',
            'collation' => 'utf8mb4_unicode_ci',
            'prefix' => '',
            'prefix_indexes' => true,
            'strict' => true,
            'engine' => null,
            'options' => extension_loaded('pdo_mysql') ? array_filter([
                PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'),
            ]) : [],
        ],

        'pgsql' => [
            'driver' => 'pgsql',
            'url' => env('DATABASE_URL'),
            'host' => env('DB_HOST', '127.0.0.1'),
            'port' => env('DB_PORT', '5432'),
            'database' => env('DB_DATABASE', 'testt'),
            'username' => env('DB_USERNAME', 'postgres'),
            'password' => env('DB_PASSWORD', '*****'),
            'charset' => 'utf8',
            'prefix' => '',
            'prefix_indexes' => true,
            'schema' => 'public',
            'sslmode' => 'prefer',
        ],

        'sqlsrv' => [
            'driver' => 'sqlsrv',
            'url' => env('DATABASE_URL'),
            'host' => env('DB_HOST', 'localhost'),
            'port' => env('DB_PORT', '1433'),
            'database' => env('DB_DATABASE', 'forge'),
            'username' => env('DB_USERNAME', 'forge'),
            'password' => env('DB_PASSWORD', ''),
            'charset' => 'utf8',
            'prefix' => '',
            'prefix_indexes' => true,
        ],

    ],

    /*
    |--------------------------------------------------------------------------
    | Migration Repository Table
    |--------------------------------------------------------------------------
    |
    | This table keeps track of all the migrations that have already run for
    | your application. Using this information, we can determine which of
    | the migrations on disk haven't actually been run in the database.
    |
    */

    'migrations' => 'migrations',

    /*
    |--------------------------------------------------------------------------
    | Redis Databases
    |--------------------------------------------------------------------------
    |
    | Redis is an open source, fast, and advanced key-value store that also
    | provides a richer body of commands than a typical key-value system
    | such as APC or Memcached. Laravel makes it easy to dig right in.
    |
    */

    'redis' => [

        'client' => env('REDIS_CLIENT', 'phpredis'),

        'options' => [
            'cluster' => env('REDIS_CLUSTER', 'redis'),
            'prefix' => env('REDIS_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_database_'),
        ],

        'default' => [
            'url' => env('REDIS_URL'),
            'host' => env('REDIS_HOST', '127.0.0.1'),
            'password' => env('REDIS_PASSWORD', null),
            'port' => env('REDIS_PORT', '6379'),
            'database' => env('REDIS_DB', '0'),
        ],

        'cache' => [
            'url' => env('REDIS_URL'),
            'host' => env('REDIS_HOST', '127.0.0.1'),
            'password' => env('REDIS_PASSWORD', null),
            'port' => env('REDIS_PORT', '6379'),
            'database' => env('REDIS_CACHE_DB', '1'),
        ],

    ],

];

Model

<?php

namespace App;

use Illuminate\Database\Eloquent\Model;

class sbtd extends Model
{
    //
    protected $table ='orders';
   //public $timestamps=true;
   //public $date=true;
}

Controller

 function update(Request $req)
    {
 $date =date_default_timezone_set('UTC');
$sbtd->date_inserted=$date;
}
Aug
26
4 weeks ago
Activity icon

Replied to Auto Update Of Date Field In Laravel

@loyd Thank you., But there was warning when i try to run using php artisan serve Imgur Kindly advise

Aug
25
4 weeks ago
Activity icon

Replied to Auto Update Of Date Field In Laravel

@sinnbeck i am getting this error

"SQLSTATE[22007]: Invalid datetime format: 7 ERROR: invalid input syntax for type date: "UTC" " My column data type is set as date for your information.

Activity icon

Replied to Auto Update Of Date Field In Laravel

@sinnbeck

        <form action="update" method="post">

//with different types of fields goes here..

 <button type="submit" class="btn btn-sucess">SUBMIT</button>
  </form>
Activity icon

Replied to Auto Update Of Date Field In Laravel

@sinnbeck my route is:

Route::post('main/update','[email protected]')->name('update'); i am calling it in the localhost:8000/main/update

Aug
24
4 weeks ago
Activity icon

Replied to Auto Update Of Date Field In Laravel

@sinnbeck

i am getting the following error The GET method is not supported for this route. Supported methods: POST.

My db is

Schema::create('orders', function (Blueprint $table){

$table->date('date_inserted')->nullable(); }

and the controller is $sbtd = new sbtd; $sbtd->date_inserted

Activity icon

Replied to Auto Update Of Date Field In Laravel

@loyd, @sinnbeck . Thanks for the feedback and support.!

Aug
23
1 month ago
Activity icon

Started a new Conversation Auto Update Of Date Field In Laravel

Hi.,

Is it possible to auto update the column of date datatype in the database, as like as timestamps, when set true, whenever the data is updated or inserted.

How to do that?

The controller code

public $timestamps=true;
Aug
22
1 month ago
Activity icon

Replied to Store The Value Back To Database, Which Has Fetched From Database

@ravish .

Seems typo error.,

updated as

let desc = $(this).find("option:selected").data('desc')

this should be covered with braces with $ sign before..

Thanks a lot for helping out :)

Activity icon

Replied to Store The Value Back To Database, Which Has Fetched From Database

HI.,

This is in the console log: Uncaught ReferenceError: $this is not defined at HTMLSelectElement. (order:6829) at HTMLSelectElement.dispatch (jquery-3.2.1.slim.min.js:3) at HTMLSelectElement.q.handle (jquery-3.2.1.slim.min.js:3)

Activity icon

Replied to Store The Value Back To Database, Which Has Fetched From Database

The Text field is not updating, while selecting or changing the dropdown values . Null value stored in the database.

Activity icon

Replied to Store The Value Back To Database, Which Has Fetched From Database

hi.,

Thanks for the update attached the form detail in gif,. the first set of fields Matting-1 and name runs on the code provided in the last reply of yours. this stores the Matting 1 in the database, but the changing the drop down doesnot have any effect on the next text field to populate the value of the Name. Hence the data has not updated in the form, that leads to null value to be stored in the database. Might be there will be tweaking required in the JS.

Form Working

The second set of field Matting 2 and Name runs on the code, which was given by earlier. ( this was suggested web for fetching the values of dropdown from database and populating the next text field with another corresponding column.). I am achieving this part. but unable to store the same in the database.

[Reference weblink] (https://stackoverflow.com/questions/54120776/laravel-ajax-jquery-input-value-of-select-dropdown-to-textbox)

Aug
21
1 month ago
Activity icon

Replied to Store The Value Back To Database, Which Has Fetched From Database

matting_1 to be 7163 40x 60 ( from source table column:item_numeric) and matting_1_name to be Rising Museum 32 x40 4ply (source table column: description)

Activity icon

Replied to Store The Value Back To Database, Which Has Fetched From Database

@ravish Nope, both the options are not works out as desired.,

The option -1 entirely, interchanges the values of the field. also only the item_numeric getting stored in the both the columns of the database. (i.e only the text value in the destination field, due to the drop down change is stored in the database on both columns) Desired Output. I want the drop down value (from item_numeric) to be stored in the matting_1 and the description column to be stored in the matting_1_name.

Right now only the value of description column is stored in the both matting_1 and matting_1_name.

Option -02, does not effect the corresponding value in the next text field, when the drop down value changes.

Activity icon

Replied to Store The Value Back To Database, Which Has Fetched From Database

@ravish please find the codes view code

<!doctype html>
<html>

<head>

    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">

    <link href="{{ asset('css/styles.css') }}" rel="stylesheet" type="text/css">
    <meta charset="utf-8">
    <title>Order Form</title>
</head>

<body>


    @if(isset(Auth::user()->email))
    <div class="alert alert-danger success-block">
        <strong>Welcome {{ Auth::user()->email }}</strong>
        <br />
        <a href="{{ url('/main/logout') }}">Logout</a>
    </div>
    @else
    <script>
        window.location = "/main";
    </script>
    @endif


    <h1>Order Form</h1>

    <<div class="container">

        <form action="update" method="post">
            @csrf

         
            <div class="row">
                <div class="col-12 col-sm-12 col-md-4 col-lg-4">
                    <label>Matting: 1</label>
                    <select id="matting_1" name="matting1" class="form-control">
                        <option value="" disabled="true" selected="true"> Select One </option>
                        @foreach ($rupaco_lists as $rupaco_list)
                        <option value="{{ $rupaco_list->description}}">{{ $rupaco_list->item_numeric }}</option>
                         @endforeach
                    </select>
                </div>

                <div class="col-12 col-sm-12 col-md-4 col-lg-4">
                    <label for="inputAddress2">Name</label>
                    <input type="text" class="form-control" readonly id="matting_1_name" name="matting1name" multiple>
                </div>

            <button type="submit" class="btn btn-sucess">SUBMIT</button>
        </form>

        <script>
            //JS
            // for mattting 01
            $(document).ready(function() {
                $("#matting_1").change(function() {
                    var air_id = $(this).val();
                   $("#matting_1_name").val(air_id);

                });
            });

        </script>

</body>

</html>

controller code

<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;
use App\sbtd;

class submitted extends Controller
{
    //

    function update(Request $req)
    {
              $sbtd = new sbtd;
          $sbtd->matting_1=$req->input('matting1');
      $sbtd->matting_1_name=$req->input('matting_1_name');
      $sbtd->save();
     return view('update');
    }
}

Activity icon

Replied to Store The Value Back To Database, Which Has Fetched From Database

nope. kindly refer the destination DB, where the value is incorrectly stored with respect to the blade view. I put cross mark.. My question is no way related to the blade view. It is all about storing in the destination database with correct values. at present it is not done

Activity icon

Replied to Store The Value Back To Database, Which Has Fetched From Database

@jlrdw Thanks for the reply, but this not i am looking for.

my source database Source DB Table

my view (blade.php) will be like this.

Blade View

I want the destination database to be inserted with Matting:1 value (W58332 32 x 40) and not as per the image my destination database:

Destination DB table

Could you please help me on this!

Aug
20
1 month ago
Activity icon

Replied to Store The Value Back To Database, Which Has Fetched From Database

@jlrdw ., yes i tried, that gives the another field (Name -mat1_nme) with the same value (i.e . itm_num,) and not the values from the deson.

i need the value from itm_num and deson to be stored separately in the database column.

Activity icon

Replied to Store The Value Back To Database, Which Has Fetched From Database

@jlrdw :

my request already has the name= "may_1"

$sbtd->mtg_1=$req->may_1;
$sbtd->mtg_1_name=$req->mat1_nme;

the suggested code

$tmp = $request->input('may_1');
   echo may_1;
   die;

and JS

alert (air_id);

both displays the value of "mat1_nme;"

which has been indicated for below snippet

<div class="col-12 col-sm-12 col-md-4 col-lg-4">
                    <label for="inputAddress2">Name</label>
                    <input type="text" class="form-control" readonly id="mat1_nme" name="mat1_nme">
                </div>

the name may_1 has been mentioned for the dynamic drop down select, which has not been displayed, since the value from $rco_list->deson is getting displayed not the value of $rco_list->itm_num .

<div class="col-12 col-sm-12 col-md-4 col-lg-4">
                    <label>Maybe</label>
                    <select id="maybe_1" name="may_1" class="form-control">
                        <option value="0" disabled="true" selected="true"> Select One </option>
                        @foreach ($rco_lists as $rco_list)
                        <option value="{{ $rco_list->deson}}">{{ $rco_list->itm_num }}</option>

Hope i had explained clearly

Activity icon

Replied to Store The Value Back To Database, Which Has Fetched From Database

@jlrdw .,

Hi, i checked the posts, but nowhere i find an information how to save the dynamic value of the drop down back to database.

I can able to create the records in the database. But the problem arisen is the value ( name ="may_1") of the dynamic dropdown has not sent to database, instead, the corresponding column value is stored back..

Could you able to advise or solve this

Aug
18
1 month ago
Activity icon

Replied to Store The Value Back To Database, Which Has Fetched From Database

yes this is correct,i am getting the value alert ($rco_list->deson), but i am unable to store the value of $rco_list->itm_num to the database

Activity icon

Started a new Conversation Store The Value Back To Database, Which Has Fetched From Database

Hi, i am getting the value for the drop down from a column (itm_num) in the database and displaying another text field with respective column (deson) value of a form. when i submitting form, the value in the drop down is not getting stored to the database. instead the value of the column (deson) is getting stored. So i am facing the problem of storing the same value of deson in two columns in the database.

myblade.php

<div class="col-12 col-sm-12 col-md-4 col-lg-4">
                    <label>Maybe</label>
                    <select id="maybe_1" name="may_1" class="form-control">
                        <option value="0" disabled="true" selected="true"> Select One </option>
                        @foreach ($rco_lists as $rco_list)
                        <option value="{{ $rco_list->deson}}">{{ $rco_list->itm_num }}</option>
                        @endforeach
                    </select>
                </div>

<div class="col-12 col-sm-12 col-md-4 col-lg-4">
                    <label for="inputAddress2">Name</label>
                    <input type="text" class="form-control" readonly id="mat1_nme" name="mat1_nme">
                </div>

JS

$(document).ready(function() {
                $("#maybe_1").change(function() {
                    var air_id = $(this).val();
                    $("#may_1").val(air_id);
                });
            });

Controller for fetching data from the database

 public function findAirName(Request $request){


        $p=Rup::select('rco_list')->where('itm_num',$request->deson)->first();
            return response()->json($p);
    }

Controller for storing back to the database

$sbtd->mtg_1=$req->may_1;
      $sbtd->mtg_1_name=$req->mat1_nme;

Please help how to store the value of name "may_1" back in the another in the database

Aug
09
1 month ago
Activity icon

Started a new Conversation Issue With Passing The Variable During Logging

Hi.,

I have the issue in routing the variable during successful login, from login page to another page. i am trying to get the variable from the database for a drop down list and corresponding the text field. on change has been done with JS

my controller code.,

<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;
use Validator;
use Auth;
use App\Rupaco;

class MainController extends Controller
{
    

    
    function index()
    {
     return view('login');
    }

    function checklogin(Request $request)
    {
     $this->validate($request, [
      'email'   => 'required|email',
      'password'  => 'required|alphaNum|min:3'
     ]);

     $user_data = array(
      'email'  => $request->get('email'),
      'password' => $request->get('password')
     );

     if(Auth::attempt($user_data))
     {
      return redirect('main/order');
     }
     else
     {
      return back()->with('error', 'Wrong Login Details');
     }

    }

    function successlogin(Request $request)
    {
        $p=Rupaco::select('rupaco_list')->where('item_numeric',$request->description)->first();
        return response()->json($p);
        return view('order');

    }

    function logout()
    {
     Auth::logout();
     return redirect('main');
    }
/*

  
*/

}

my route code

<?php

use Illuminate\Support\Facades\Route;
use app\Rupaco;


Route::get('/', function () {
    return view('welcome');
});



Route::get('/uploadfile', '[email protected]');
Route::post('/uploadfile', '[email protected]');

Route::get('/main', '[email protected]');
Route::post('/main/checklogin', '[email protected]');
Route::get('main/order', array('as'=>'order', 'uses'=>'[email protected]'));
//Route::get('main/order', '[email protected]');
Route::get('main/logout', '[email protected]');


order.blade.php

<!doctype html>
<html>

<head>

    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">

    <link href="{{ asset('css/styles.css') }}" rel="stylesheet" type="text/css">
    <meta charset="utf-8">
    <title>Order Form</title>
</head>

<body>

    <h1>Login Page - Front</h1>

    <div class="container">

    @if(isset(Auth::user()->email))
    <div class="alert alert-danger success-block">
     <strong>Welcome {{ Auth::user()->email }}</strong>
     <br />
     <a href="{{ url('/main/logout') }}">Logout</a>
    </div>
   @else
    <script>window.location = "/main";</script>
   @endif

        <div class="form-group">
        



        <div class="row">
            <div class="col-12 col-sm-12 col-md-4 col-lg-4">
                <label>Matting: 1</label>
                <select id="matting_1" name="matt_1" class="form-control">
                    <option value="0" disabled="true" selected="true"> Select One </option>
                    @foreach ($rupaco_lists as $rupaco_list)
                    <option value="{{ $rupaco_list->description}}">{{ $rupaco_list->item_numeric }}</option>
                    @endforeach
                </select>
            </div>

            <div class="col-12 col-sm-12 col-md-4 col-lg-4">
                <label for="inputAddress2">Name</label>
                <input type="text" class="form-control" readonly id="matting_1_name">
            </div>

            
        </div>

</div>



</body>

</html>

login.blade.php


<!DOCTYPE html>
<html>
 <head>
  <title>Simple Login System in Laravel</title>
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.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.7/js/bootstrap.min.js"></script>
  <style type="text/css">
   .box{
    width:600px;
    margin:0 auto;
    border:1px solid #ccc;
   }
  </style>
 </head>
 <body>
  <br />
  <div class="container box">
   <h3 align="center">Login System </h3><br />

   @if(isset(Auth::user()->email))
    <script>window.location="/main/order";</script>
   @endif

   @if ($message = Session::get('error'))
   <div class="alert alert-danger alert-block">
    <button type="button" class="close" data-dismiss="alert">×</button>
    <strong>{{ $message }}</strong>
   </div>
   @endif

   @if (count($errors) > 0)
    <div class="alert alert-danger">
     <ul>
     @foreach($errors->all() as $error)
      <li>{{ $error }}</li>
     @endforeach
     </ul>
    </div>
   @endif

   <form method="post" action="{{ url('/main/checklogin') }}">
    {{ csrf_field() }}
    <div class="form-group">
     <label>Enter Email</label>
     <input type="email" name="email" class="form-control" />
    </div>
    <div class="form-group">
     <label>Enter Password</label>
     <input type="password" name="password" class="form-control" />
    </div>
    <div class="form-group">
     <input type="submit" name="login" class="btn btn-primary" value="Login" />
    </div>
   </form>
  </div>
 </body>
</html>