Arunava007

Arunava007

Member Since 7 Months Ago

Kolkata

Experience Points 560
Experience Level 1

4,440 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 0
Lessons
Completed
Best Reply Awards 0
Best Reply
Awards
  • start-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-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-token Created with Sketch.

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • lifer-token Created with Sketch.

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • lara-evanghelist 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.

10 Mar
6 months ago

Arunava007 left a reply on AJAX GET REQUEST USING LARAVEL

@BOBBYBOUWMANN - But sir .. how can i use same GET routes for two different functions. I want to display data on same page.

Arunava007 left a reply on AJAX GET REQUEST USING LARAVEL

@BOBBYBOUWMANN - How to return this database data to ajax?to print it within the div

Arunava007 started a new conversation AJAX GET REQUEST USING LARAVEL

My objective is to show data from database depending upon the dropdown value i select in the same page. Error:: POST method not allowed

I was able to display data in different page but i failed when it comes to the same page in a different div section. Please help me out

My CRD.blade.php


<!DOCTYPE html>
<html>
<head>
    <title>ROBOTICS DESK</title>
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>

</head>
<body>


<h1>ROBOTICS</h1>

<form id="myform">
    EVent Name &nbsp;<select name="event" id ="event">
        <option value="" selected="selected">--- Please select ---</option>

        <option id="R1" value="Infinity War">Infinity War</option>
        <option id="R2" value="Terrestrial Terrain">Terrestrial Terrain</option>
        <option id="R3" value="Robo Rugby">Robo Rugby</option>
        <option id="R4" value="Sputnik">Sputnik</option>

    </select>


    <input type="button" name="submit" class="button" value="CHECK TEAM REGISTERED" onclick="check()"><br><br>

    <div id="data"></div>   <br>

</form>

<script>
    function check()
    {
        var str="SOMETHING IS WRONG";
        var event=$("#event").val();

        $.ajax({
            url :'/CRD',
            type:'POST',
            dataType:'html',
            data :{
                'action':'generate',
                'event':event,

            },
            success:function(data){
                if(str==data){
                    $('#data').html(data);
                    //$('#myform')[0].reset();
                }
                else{
                    $('#data').html(data);
                    //$('#myform')[0].reset();
                }
            }
        });
    }

My Controller


<?php

namespace App\Http\Controllers;
use Illuminate\Contracts\Database;
use Illuminate\Support\Facades\DB;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Response;

class CRDController extends Controller
{
    public function index()
    {
//
      return view("CRD");
    }
    public function mycrd(Request $request)
    {
        $data = DB::table('rd1')->where([
            ['domain', '=', $request->domain],
            ['event', '=', $request->event],

        ])->get();
        dd($data);
    }
}


My Routes

//CRD
Route::get('/CRD',['as'=>'CRD','uses'=> '[email protected]']);
Route::post('/mycrd',['as'=>'mycrd','uses'=> '[email protected]']);


09 Mar
6 months ago

Arunava007 left a reply on DISPLAY DATA FROM DATBASE UPON FORM ENTRY IN SAME PAGE

@JLRDW - Yes i used it but it is failing somehow My controller:


<?php

namespace App\Http\Controllers;
use Illuminate\Contracts\Database;
use Illuminate\Support\Facades\DB;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Response;

class CRDController extends Controller
{
    public function index()
    {
//
      return view("CRD");
    }
    public function mycrd(Request $request)
    {
        $data = DB::table('rd1')->where([
            ['domain', '=', $request->domain],
            ['event', '=', $request->event],

        ])->get();
        return Response::json($data);
    }
}


My CRD.blade.php

<form method="post" >
    {{ csrf_field() }}




    Domain Name: &nbsp; <select name="domain" id="domain">
        <option value="" selected="selected">--- Please select ---</option>
        <option value="Robotics">Robotics</option>
        <option value="Coding">Coding</option>
        <option value="Gaming">Gaming</option>
        <option value="Electrical">Electrical</option>
        <option value="Civil">Civil</option>
        <option value="General Events">General</option>
    </select>




    <input type="button" name="submit" class="button" value="CHECK EVENT LIST" onclick="validate()"><br><br>

    Event Name: &nbsp; <select name="event" id ="event">

        <!-- ROBOTICS -->

        <option value="" selected="selected">--- Please select ---</option>
        <option id="R1" value="Infinity War">Infinity War</option>
        <option id="R2" value="Terrestrial Terrain">Terrestrial Terrain</option>
        <option id="R3" value="Robo Rugby">Robo Rugby</option>
        <option id="R4" value="Sputnik">Sputnik</option>
        <option id="RC" value="Robo Combo">Robo Combo</option>

        <!-- CODING -->

        <option id="C1" value="Code Nova">Code Nova</option>
        <option id="C2" value="Code Xtreme">Code Xtreme</option>
        <option id="C4" value="Code Red">Code Red</option>
        <option id="C5" value="Web-o-Philia">Web-o-Philia</option>
        <option id="C6" value="Design-O-Static">Design-O-Static</option>
        <option id="CC" value="Coding Combo">Coding Combo</option>


        <!-- GAMING -->

        <option id="G1" value="COD MW 4">COD MW 4</option>
        <option id="G2" value="CS 1.6">CS 1.6</option>
        <option id="G3" value="FIFA 11">FIFA 11</option>
        <option id="G4" value="NFS MW">NFS MW</option>
        <option id="GC" value="Gaming Combo">Gaming Combo</option>


        <!-- Electrical -->

        <option id="E1" value="Circuitrix">Circuitrix</option>
        <!-- <option id="E2" value="Electroblitz">Electroblitz</option> -->


        <!-- CIVIL -->

        <option id="CE1" value="Setu Bandhan">Setu Bandhan</option>
        <option id="CE2" value="Mega Arch">Mega Arch</option>
        <option id="CE3" value="Track O Treasure">Track O Treasure</option>
        <option id="CEC" value="Civil Combo">Civil Combo</option>

        <!-- GENERAL -->

        <!-- <option id="GE1" value="Pubg">Pubg</option>
       <option id="GE2" value="8 Ball Pool">8 Ball Pool</option>
       <option id="GE3" value="Mini Militia">Mini Militia</option>
       <option id="GE4" value="Darts">Darts</option> -->
        <option id="GE5" value="Carrom">Carrom</option>
        <option id="GE6" value="Chess">Chess</option>
        <option id="GE7" value="B-Plan">B-Plan</option>
        <option id="GE8" value="Table Tennis">Table Tennis</option>
        <option id="GE9" value="Photography">Photography</option>
        <option id="GE10" value="Videography">Videography</option>
        <option id="GEC" value="Photography+Videography Combo">Photography+Videography Combo</option>

    </select><br><br>

    <input type="button" name="submit" class="button" value="CHECK TEAM REGISTERED" onclick="check()"><br><br>

    <div id="data"></div><br>


</form>

<script>
    function check()
    {
        var str="SOMETHING IS WRONG";
        var domain = $("#domain").val();
        var event=$("#event").val();

        $.ajax({
            url :'mycrd',
            type:'POST',
            dataType:'html',
            data :{
                'action':'generate',
                'event':event,
                'domain':domain,

            },
            success:function(data){
                if(str==data){
                    $('#data').html(data);
                    //$('#myform')[0].reset();
                }
                else{
                    $('#data').html(data);
                    //$('#myform')[0].reset();
                }
            }
        });
    }

My routes:


Route::get('/CRD',['as'=>'CRD','uses'=> '[email protected]']);
Route::get('mycrd', '[email protected]');


03 Mar
6 months ago

Arunava007 started a new conversation DISPLAY DATA FROM DATBASE UPON FORM ENTRY IN SAME PAGE

Basically my goal is to make a form and display data in same page just below the form according to values of form by fetching it from database. Guide with me the routes. Need help in how to fetch values from database in separate route(GET) by using values from previous route(POST)

My View:

<form method="post"  action="{{ route('CRD') }}">
    {{ csrf_field() }}




    Domain Name: &nbsp; <select name="domain" id="domain">
        <option value="" selected="selected">--- Please select ---</option>
        <option value="Robotics">Robotics</option>
        <option value="Coding">Coding</option>
        <option value="Gaming">Gaming</option>
        <option value="Electrical">Electrical</option>
        <option value="Civil">Civil</option>
        <option value="General Events">General</option>
    </select>




    <input type="button" name="submit" class="button" value="CHECK EVENT LIST" onclick="validate()"><br><br>

    Event Name: &nbsp; <select name="event" id ="event">

        <!-- ROBOTICS -->

        <option value="" selected="selected">--- Please select ---</option>
        <option id="R1" value="Infinity War">Infinity War</option>
        <option id="R2" value="Terrestrial Terrain">Terrestrial Terrain</option>
        <option id="R3" value="Robo Rugby">Robo Rugby</option>
        <option id="R4" value="Sputnik">Sputnik</option>
        <option id="RC" value="Robo Combo">Robo Combo</option>

        <!-- CODING -->

        <option id="C1" value="Code Nova">Code Nova</option>
        <option id="C2" value="Code Xtreme">Code Xtreme</option>
        <option id="C4" value="Code Red">Code Red</option>
        <option id="C5" value="Web-o-Philia">Web-o-Philia</option>
        <option id="C6" value="Design-O-Static">Design-O-Static</option>
        <option id="CC" value="Coding Combo">Coding Combo</option>


        <!-- GAMING -->

        <option id="G1" value="COD MW 4">COD MW 4</option>
        <option id="G2" value="CS 1.6">CS 1.6</option>
        <option id="G3" value="FIFA 11">FIFA 11</option>
        <option id="G4" value="NFS MW">NFS MW</option>
        <option id="GC" value="Gaming Combo">Gaming Combo</option>


        <!-- Electrical -->

        <option id="E1" value="Circuitrix">Circuitrix</option>
        <!-- <option id="E2" value="Electroblitz">Electroblitz</option> -->


        <!-- CIVIL -->

        <option id="CE1" value="Setu Bandhan">Setu Bandhan</option>
        <option id="CE2" value="Mega Arch">Mega Arch</option>
        <option id="CE3" value="Track O Treasure">Track O Treasure</option>
        <option id="CEC" value="Civil Combo">Civil Combo</option>

        <!-- GENERAL -->

        <!-- <option id="GE1" value="Pubg">Pubg</option>
       <option id="GE2" value="8 Ball Pool">8 Ball Pool</option>
       <option id="GE3" value="Mini Militia">Mini Militia</option>
       <option id="GE4" value="Darts">Darts</option> -->
        <option id="GE5" value="Carrom">Carrom</option>
        <option id="GE6" value="Chess">Chess</option>
        <option id="GE7" value="B-Plan">B-Plan</option>
        <option id="GE8" value="Table Tennis">Table Tennis</option>
        <option id="GE9" value="Photography">Photography</option>
        <option id="GE10" value="Videography">Videography</option>
        <option id="GEC" value="Photography+Videography Combo">Photography+Videography Combo</option>

    </select><br><br>
    <div class="form-group">
        <div class="col-md-6 col-md-offset-4">
            <button type="submit" class="btn btn-primary" onclick="window.location='{{ route("display") }}'>
                SUBMIT
            </button>

        </div>
    </div>






    @foreach($users as $row)
        <tr>
            <td>{{$row->TID}}</td>

        </tr>
    @endforeach




</form>

My controller:

class CRDController extends Controller
{
    public function index()
    {
        $users = DB::table('rd1')->where([
            ['domain', '=', "bc"],
            ['event', '=', "bc"],

        ])->get();
        return view("CRD")->with('users',$users);
    }
    public function fetch(Request $request)
    {
        $users = DB::table('rd1')->where([
            ['domain', '=', $request->domain],
            ['event', '=', $request->event],

        ])->get();
        return view("CRD")->with('users',$users);
    }
}

My route:


Route::get('/CRD',['as'=>'CRD','uses'=> '[email protected]']);
Route::get('/CRD',['as'=>'display','uses'=> '[email protected]']);

16 Feb
7 months ago

Arunava007 left a reply on Method 'table' Not Found In \Illuminate\Support\Facades\DB

Actually the problem which is happening:

I have and index function inside that controllerr which only return views. When clicking on it users is undefined but my objective is to open that page and select two drpdowns and then on clicking submit it displays the list of all persons in the same page

15 Feb
7 months ago

Arunava007 left a reply on Method 'table' Not Found In \Illuminate\Support\Facades\DB

@JLRDW - Oh come on i have checked all those requests by echo.. alll are working fyn

Arunava007 left a reply on Method 'table' Not Found In \Illuminate\Support\Facades\DB

@CRONIX -


<!DOCTYPE html>
<html >
<head>
    <meta charset="UTF-8">
    <title>RD</title>
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>

</head>

<body>
<div class="login">
    <h1>Registration Desk</h1>



</div>

<div>
<table border = 1>
    <tr>
        <td>ID</td>


    </tr>
    @foreach ($users as $user)
        <tr>
            <td>{{ $user->TID }}</td>

        </tr>
    @endforeach
</table>
</div>

Arunava007 left a reply on Method 'table' Not Found In \Illuminate\Support\Facades\DB

@ESORONE - Collection {#235 ▼ #items: array:3 [▶] }

Its working fine.then where is the problem??

Arunava007 left a reply on Method 'table' Not Found In \Illuminate\Support\Facades\DB

@CRONIX - I have checked that too without if

Arunava007 left a reply on Error In Save Data

use Controller

Arunava007 left a reply on Access Obj Key Like $company->$property->key

Give any example. You are too short to be understood

Arunava007 left a reply on Method 'table' Not Found In \Illuminate\Support\Facades\DB

Controller:

<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
use App\Http\Requests;
use App\Http\Controllers\Controller;

class CRDController extends Controller
{
    public function index()
    {
        return view('CRD');
    }
    public function fetch(Request $request)
    {
        $dom = $request->domain;
        $event = $request->event;
        if($dom === "Robotics")
        {$users = DB::table('rd1')->where('domain', $dom)->where('event',$event)->get();

        return view('CRD',['users'=>$users]);}
    }
}

it always shows a error $users is undefined and empty and table function remains highlighted and upon hover it shows the above mentioned error.

14 Feb
7 months ago

Arunava007 left a reply on Method 'table' Not Found In \Illuminate\Support\Facades\DB

Can anyone post his DB.PHP class? I can compare it with mine.

Arunava007 left a reply on Method 'table' Not Found In \Illuminate\Support\Facades\DB

@JLRDW - See my post properly. I have already mentioned the use of it.

Arunava007 left a reply on Method 'table' Not Found In \Illuminate\Support\Facades\DB

Laravel 5.5 No use/DB doesnt worked for me

Arunava007 started a new conversation Method 'table' Not Found In \Illuminate\Support\Facades\DB

I have used use Illuminate\Support\Facades\DB; still its table static function is not found. I have opened DB.php in facades and there was no static function DB. Any suggestions how i can fetch data using where clause?

01 Feb
7 months ago

Arunava007 left a reply on Using Back Button Of Browser To Go To Previous Url.

But he asked for back button of browser..

31 Jan
7 months ago

Arunava007 left a reply on FORM DATA ENTRY INTO DATABASE

@DALMA - Ya i know about this

Arunava007 left a reply on FORM DATA ENTRY INTO DATABASE

Ok thank you all for your help.. I know questions are silly.. but this is my first day exploring Laravel. Thank You

Arunava007 left a reply on FORM DATA ENTRY INTO DATABASE

    
 public function up()
    {
        Schema::create('users', function (Blueprint $table) {
            $table->increments('id');
            $table->string('username');
            $table->string( 'company');
            $table->string('mail')->unique();
            $table->string('contactnumber');
            $table->string('jenislayanan');

        });
    }



I have not made created_at column but it still showing created_at column missing. Where to see in laravel_project all these column list?

Arunava007 left a reply on FORM DATA ENTRY INTO DATABASE

@GRENADECX - Symfony \ Component \ Debug \ Exception \ FatalThrowableError (E_ERROR) Class 'App\Http\Controllers\User' not found

Arunava007 left a reply on FORM DATA ENTRY INTO DATABASE


<!DOCTYPE html>
<html >
<head>
    <meta charset="UTF-8">
    <title>Login Form</title>
</head>

<body>

<form class="form-horizontal" method="POST" action="{{ route('MRD1') }}">

<div>
    <label for="username" class="col-md-4 control-label" name="username">NAME</label>

    <div class="col-md-6">
        <input id="username" type="text" class="form-control" name="username">
    </div>
</div>

<div>
    <label for="company" class="col-md-4 control-label" name="company">COMPANY</label>

    <div class="col-md-6">
        <input id="company" type="text" class="form-control" name="company">
    </div>

    <div>
        <label for="email" class="col-md-4 control-label">E-MAIL</label>

        <div class="col-md-6">
            <input id="mail" type="email" class="form-control" name="mail" value="{{ old('email') }}">
        </div>
    </div>

    <div>
        <label for="contactnumber" class="col-md-4 control-label">CONTACT NUMBER</label>

        <div class="col-md-6">
            <input id="contactnumber" type="text" class="form-control" name="contactnumber"
                   value="{{ old('contactnumber') }}">
        </div>
    </div>

    <div class="form-group">
        <label for="jenislayanan" class="col-md-4 control-label">DEPT</label>
        <div class="col-md-6">
            <select name="jenislayanan">
                <option value="1st">1st</option>
                <option value="2nd">2nd</option>
                <option value="3rd">3rd</option>
            </select>
        </div>
    </div>

    <div class="form-group">
        <div class="col-md-6 col-md-offset-4">
            <button type="submit" class="btn btn-primary">
                SUBMIT
            </button>

        </div>
    </div>
</div>
</form>

</body>
</html>





Updated this but after clicking submit button this message is displayed:

The page has expired due to inactivity.

Please refresh and try again.

Arunava007 left a reply on FORM DATA ENTRY INTO DATABASE

This is the login form:

<!DOCTYPE html>
<html >
<head>
    <meta charset="UTF-8">
    <title>Login Form</title>
</head>

<body>
<div>
    <label for="username" class="col-md-4 control-label" name="username">NAME</label>

    <div class="col-md-6">
        <input id="username" type="text" class="form-control" name="username">
    </div>
</div>

<div>
    <label for="company" class="col-md-4 control-label" name="company">COMPANY</label>

    <div class="col-md-6">
        <input id="company" type="text" class="form-control" name="company">
    </div>

    <div>
        <label for="email" class="col-md-4 control-label">E-MAIL</label>

        <div class="col-md-6">
            <input id="mail" type="email" class="form-control" name="mail" value="{{ old('email') }}">
        </div>
    </div>

    <div>
        <label for="contactnumber" class="col-md-4 control-label">CONTACT NUMBER</label>

        <div class="col-md-6">
            <input id="contactnumber" type="text" class="form-control" name="contactnumber"
                   value="{{ old('contactnumber') }}">
        </div>
    </div>

    <div class="form-group">
        <label for="jenislayanan" class="col-md-4 control-label">DEPT</label>
        <div class="col-md-6">
            <select name="jenislayanan">
                <option value="1st">1st</option>
                <option value="2nd">2nd</option>
                <option value="3rd">3rd</option>
            </select>
        </div>
    </div>

    <div class="form-group">
        <div class="col-md-6 col-md-offset-4">
            <a href="{{route('MRD1')}}" class="btn btn-default">Go to Google</a>

        </div>
    </div>
    </form>
</div>
</div>
</body>
</html>


Arunava007 left a reply on FORM DATA ENTRY INTO DATABASE

@RONB1985 - Symfony \ Component \ HttpKernel \ Exception \ MethodNotAllowedHttpException

Arunava007 started a new conversation FORM DATA ENTRY INTO DATABASE

My Routes File:


    Route::post('/MRD1', ['as' => 'MRD1', 'uses' => '[email protected]_data']);

My Controller:

    
     public function save_data(Request $request)
        {
            $user = User::create($request->all());
            return redirect()->route('MRD');
        }

My User.php:


 class User extends Authenticatable
{
    use Notifiable;

    /**
     * The attributes that are mass assignable.
     *
     * @var array
     */
    protected $fillable = [
        'username', 'company', 'contactnumber','mail','jenislayanan'
    ];

    /**
     * The attributes that should be hidden for arrays.
     *
     * @var array
     */
//    protected $hidden = [
//        'password', 'remember_token',
//    ];
    protected $table = 'users';
}


Still database entry is not happening. Displaying errors