JAY_CHAUHAN

JAY_CHAUHAN

Member Since 3 Months Ago

bhavnagar, Gujarat

Web Developer at Windzoon

Experience Points 3,660
Experience Level 1

1,340 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 25
Lessons
Completed
Best Reply Awards 1
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]laracasts.com 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.

22 Jul
3 weeks ago

JAY_CHAUHAN left a reply on How To Change A Default Auth Table.

Ok, I use a guard for this one and I know how to define.

So, Thank you so much @tykus

I give you the right answer, thanks for the help.

19 Jul
4 weeks ago

JAY_CHAUHAN left a reply on How To Change A Default Auth Table.

@tykus

ok then using

    'defaults' => [
        'guard' => 'web',
    ],

this code defines "admins" providers for all auth:: attempt, right?

but if I have multiple authentication table then can I create multiple guards to apply a particular table?

ex: I have 3 different tables and 3 logins (like admins, users, and seller ) then its possible to switch auth:: attempt to decide which table was executed to find user credentials.

hope you understand.

JAY_CHAUHAN left a reply on How To Change A Default Auth Table.

Thank you for reply @sergiu17 and @tykus

after that how I give my provider to auth: attempt ?

because the current code still not work.

JAY_CHAUHAN started a new conversation How To Change A Default Auth Table.

hello, guys,

$rules = array(
        'email'    => 'required|email', 
        'password' => 'required|alphaNum' 
    );
   
    $validator = Validator::make(Input::all(), $rules);

    if ($validator->fails()) {
        return Redirect::to('login')
            ->withErrors($validator) // send back all errors to the login form
            ->withInput(Input::except('password')); // send back the input (not the password) so that we can repopulate the form
    } else {

        // create our user data for the authentication
        $userdata = array(
            
            'password'  => Input::get('password'),
            'email'     => Input::get('email')
        );
      
        // attempt to do the login
        if (Auth::attempt($userdata,true)) {

            // validation successful!
            // redirect them to the secure section or whatever
            // return Redirect::to('secure');
            // for now we'll just echo success (even though echoing in a controller is bad)
            //return Redirect::to('Home');
            echo 'SUCCESS!';
            echo  Auth::user()->uname;

        } else {

            // validation not successful, send back to form
            echo "string";
    }

default Auth:: attempt method use "users" table to match "$userdata" credential.

my question is how to change this auth attempt method table "users" to my new table "admins"?

08 Jul
1 month ago

JAY_CHAUHAN left a reply on How To Pass Input Field Id Pass In Script

hi @vandan29

Ok got it then you should try to follow this link and try to solve this issue.

http://jsfiddle.net/cSfYE/1/

https://stackoverflow.com/questions/19714867/sum-of-dynamic-input-fields-jquery

Or may be this one also.

https://forum.jquery.com/topic/autocomplete-doesnt-work-in-dynamic-input-field

check this links and give feedback if your issue is solve.

02 Jul
1 month ago

JAY_CHAUHAN left a reply on How To Pass Input Field Id Pass In Script

hi @vandan29

You can pass your id into javascript by following simple example.

<form>
  a: <input type="number" name="a" id="a"><br>
  b: <input type="number" name="b" id="b"><br>
  <button onclick="add()">Add</button>
</form>

<script>
  function add() {
    var a = document.getElementById('a').value;
    var b = document.getElementById('b').value;

    var sum = parseInt(a) + parseInt(b);
    alert(sum);
  }
</script>

if you use jquery then use

$('#xx').val();

hope you try your code by given way and solve this issue.

24 Jun
1 month ago

JAY_CHAUHAN left a reply on Citywise Job Print Dropdown In Laravel

Hi @van1310

yes, you can do it with city drop-down onchange event.

after changing city ajax call is fire on particular laravel route and fetch jobs using city id and bind html to the job dropdown.

You can refer following links.

https://www.codermen.com/blog/55/ajax-dynamic-dependent-country-state-city-dropdown-using-jquery-ajax-in-laravel-5-6

http://www.expertphp.in/article/dependent-country-state-city-dropdown-using-jquery-ajax-in-laravel-5-example

Hope you understand.

20 Jun
1 month ago

JAY_CHAUHAN left a reply on Ajax Autosave Selection Without Submit Button

check following code i hope this will work for you.

Ajax Status Update


<link href="//netdna.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" rel="stylesheet">
<script src = "https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<script type="text/javascript">
    $( "#status" ).change(function() { 
        var id =$("#hid").val();
        var status =$("#status").val();
        console.log(status + " " + id);
        $.ajax({
            type: "GET",
            url: "update/"+ id + "status/" + status,
            success: function(data){
            console.log(data);
            $("#update").val(data);
            },
        });
    });
</script>

route file

Route::get('round/update/{id}/{status}',array('as'=>'round.edit','uses'=>'Admin\[email protected]_update'));

blade file


<input type="hidden" id="hid" value="{{$view->id}}" name="hid">
<select class="form-control m-input" id="status" name="status">
<option value="underprocess" >Under Process</option>
<option value="reject">Reject</option>
<option value="clear">Clear</option><br>
 </select>                  
<div id="autosave"></div>                                                           

JAY_CHAUHAN left a reply on Ajax Autosave Selection Without Submit Button

@van1310 In this code what is error you get ?

You say about error then we can suggest you something ?

13 May
3 months ago

JAY_CHAUHAN left a reply on How To Use Storage::download()

@michalis

try this one

return Storage::disk('public')->download($file->path);

JAY_CHAUHAN left a reply on How To Use Storage::download()

@michalis please send me what contains a $link[0]->download_link

This is some id or anything text

also send where is your file in storage folder (extact location like storage->public->abc.txt etc) .

JAY_CHAUHAN left a reply on How To Pass Id Into Middleware In Laravel

when you enter in controller the first check

Determining If The Current User Is Authenticated

To determine if the user is already logged into your application, you may use the check method on the Auth facade, which will return true if the user is authenticated:

use Illuminate\Support\Facades\Auth;

if (Auth::check()) { // The user is logged in... }

try this,

JAY_CHAUHAN left a reply on How To Use Storage::download()

It may caching issue, clear the laravel cache by following command

php artisan cache:clear

php artisan route:cache

php artisan config:cache

php artisan view:clear

or if still this not work then try

return Storage::download("your path after storage/App", $link[0]->download_link);

i hope this will work for you.

08 May
3 months ago

JAY_CHAUHAN left a reply on How To Login From 2 Different Tables?

My suggestion is to make new table called "user_master" and store your crendetial fields like email, password etc...

add one "user_type" field in user_master table to define the user type (like student and teacher).

so this makes a common login form for both user (student and teacher).

when any user authenticate then match that credential with user_master table, after that you identify the user by its "user_type" field and redirect to perticular screen.

03 May
3 months ago

JAY_CHAUHAN left a reply on Best SEO For Laravel??

Hello,

I find something for you if it is helpfull,

  1. Before getting started with how do SEO for a Laravel website first ?? check full details in URL : https://websiteseochecker.com/blog/laravel-seo-optimization-updated-2019-seo-for-laravel/

  2. Setting your meta tag and place good content. check full details in URL : https://laravel.io/forum/02-27-2014-seo-optimization