Jaikangam

Jaikangam

Member Since 9 Months Ago

Experience Points 7,030
Experience Level 2

2,970 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 56
Lessons
Completed
Best Reply Awards 0
Best Reply
Awards
  • Start Your Engines Achievement

    Start Your Engines

    Earned once you have completed your first Laracasts lesson.

  • First Thousand Achievement

    First Thousand

    Earned once you have earned your first 1000 experience points.

  • One Year Member Achievement

    One Year Member

    Earned when you have been with Laracasts for 1 year.

  • Two Year Member Achievement

    Two Year Member

    Earned when you have been with Laracasts for 2 years.

  • Three Year Member Achievement

    Three Year Member

    Earned when you have been with Laracasts for 3 years.

  • Four Year Member Achievement

    Four Year Member

    Earned when you have been with Laracasts for 4 years.

  • Five Year Member Achievement

    Five Year Member

    Earned when you have been with Laracasts for 5 years.

  • School In Session Achievement

    School In Session

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

  • Welcome To The Community Achievement

    Welcome To The Community

    Earned after your first post on the Laracasts forum.

  • Full Time Learner Achievement

    Full Time Learner

    Earned once 100 Laracasts lessons have been completed.

  • Pay It Forward Achievement

    Pay It Forward

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

  • Subscriber Achievement

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • Lifer Achievement

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • Laracasts Evangelist Achievement

    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 Achievement

    Chatty Cathy

    Earned once you have achieved 500 forum replies.

  • Laracasts Veteran Achievement

    Laracasts Veteran

    Earned once your experience points passes 100,000.

  • Ten Thousand Strong Achievement

    Ten Thousand Strong

    Earned once your experience points hits 10,000.

  • Laracasts Master Achievement

    Laracasts Master

    Earned once 1000 Laracasts lessons have been completed.

  • Laracasts Tutor Achievement

    Laracasts Tutor

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

  • Laracasts Sensei Achievement

    Laracasts Sensei

    Earned once your experience points passes 1 million.

  • Top 50 Achievement

    Top 50

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

09 Apr
1 week ago

Jaikangam left a reply on [caching_sha2_password] Error When Running Php Artisan Migrate

I was getting error in the production server while php artisan migrate

In connection.php line: 664

SQLSTATE[HY000] [1698] Access denied for user 'root'@'localhost' (SQL: select * from information_schema.tables whe re table_schema = prod and table_name = migrations)

In connection.php line: 70 SQLSTATE[HY000] [1698] Access denied for user 'root'@'localhost'

After running the @mibou520 comment on myslq it is working for fine for me. Thanks ...

Jaikangam left a reply on [caching_sha2_password] Error When Running Php Artisan Migrate

@MIBOU520 - I was getting error in the production server while php artisan migrate

In connection.php line: 664

SQLSTATE[HY000] [1698] Access denied for user 'root'@'localhost' (SQL: select * from information_schema.tables whe re table_schema = prod and table_name = migrations)

In connection.php line: 70 SQLSTATE[HY000] [1698] Access denied for user 'root'@'localhost'

After running the @mibou520 comment on myslq it is working for fine for me. Thanks ...

25 Jan
2 months ago

Jaikangam started a new conversation Npm Run Watch Stop Working While Npm Run Dev Work, How I Can Make It Work It Again Npm Run Watch

hi developer, i am using laravel mix, i have being using npm run watch it is working fine. after i install one package its stop working while npm run dev is working fine. What is the reason for npm run watch stop working. The error is so painful cant understand #laravelmix

help if you come across like this. To make it work again the npm run watch.

24 Jan
2 months ago

Jaikangam started a new conversation How Can I Use Jquery For One Component In Vue ?

hi developer, I have old project that use jquery particle.js in the home background image. I am shifting to vue js. on the home component i want to implement the same particle.js. how can be implemented??

Jaikangam left a reply on Can We Use Jquery On Vue Js Application ?

@import '~bootstrap/scss/bootstrap';

this is how the default import. where should i place the themeforest css. will be on the public folder or resource folder. ?? any demo example please... will be thankful

Jaikangam started a new conversation Can We Use Jquery On Vue Js Application ?

Hi Developer, I have use Jquery on my old project and now i want to switch it to Vue js. i have use themforest template and the css file come around 5 to 6 file. so

  1. how do i add (import) css file into sass in the resource/sass. and where do i keep my css file. is it on the public or the resource folder.

  2. i have implemented particle js on home background image which is use jquery and now how do i convert it to vue js.

19 Jan
3 months ago

Jaikangam started a new conversation How To Add Themeforest Custome Css File In The Resource/asset/sass File ?

Please help how do i add the css file in the resource folder to be use for vue front end.

Jaikangam left a reply on How To Write Code In Laracast?

``` testing 3 `

Jaikangam started a new conversation How Do I Add Theme Template Css And Js In The Laravel And Vue ?

Need help badly, i add theme template css and js in the public folder. Want to use those as vue.

i added vue js

and add ``` // html here ``` in the body. It break my css. How do i solve it please help
29 Nov
4 months ago

Jaikangam left a reply on Laravel 5.3 Passport Unsupported Grant_type

I got the similar error. How i did solve was My route: http://localhost:8000/oauth/token Under the Body> raw { "grant_type" : "password", "client_id" : "2", "client_secret" : "1hR6PoljOmvJNzee1n052FKsk0LYFyPSfYmWygLQ", "username" : "jaikangam12@gmail.com", "password" : "123456"

} I was try like this but got the error so change into body>form-data. Filled up the same key and value and it works now.

Watch here at 12:20 https://www.youtube.com/watch?v=isTZTfJV0-I&t=736s

28 Nov
4 months ago

Jaikangam started a new conversation What Is The Different Between Passport, Jwt, Auth0, Sociallite ??

I am full confuse seem to be all similar, when to use it all this i can figure out. Jwt is for authentication the mobile app? is it like that passport for social login like facebook , github and more. And socialite for social auth. What is the different between sociallite and passport? they seem to have same functionality. Can someone explain this four topic in brief.... Thanks.......

21 Nov
5 months ago

Jaikangam left a reply on Laravel Old Input Messing With Bootstrap Textarea

@ROCKHOPPER72 - nothing working bro. it is getting old('remarks') instead if the last inserted value

20 Nov
5 months ago

Jaikangam started a new conversation How To Retrive The Json Data Array And Print That Value? In Vue And Axios.

hi buddy In my vue application. i find difficult to take out the json data and print that value. i m not able to do it. Please if you know how to print it. In my vue app using axios for https request. This is my country pincode api http://postalpincode.in/api/pincode/797112 and on the postman app my jason data are

 "Message": "Number of Post office(s) found: 12",
    "Status": "Success",
    "PostOffice": [
        {
            "Name": "Dimapur",
            "Description": "",
            "BranchType": "Sub Post Office",
            "DeliveryStatus": "Delivery",
            "Taluk": "Dimapur",
            "Circle": "Dimapur",
            "District": "Dimapur",
            "Division": "Nagaland",
            "Region": "North Eastern",
            "State": "Nagaland",
            "Country": "India"
        },
        {
            "Name": "Doyapur",
            "Description": "",
            "BranchType": "Branch Post Office",
            "DeliveryStatus": "Delivery",
            "Taluk": "Dimapur Mdg",
            "Circle": "Dimapur Mdg",
            "District": "Dimapur",
            "Division": "Nagaland",
            "Region": "North Eastern",
            "State": "Nagaland",
            "Country": "India"
        }, 
and more......

How do i get that name , state and country to print it in the view

axios.get('https://postalpincode.in/api/pincode/' + app.startingZip)
                .then(function (response) {
                  app.startingCity = response.data.PostOffice.Name 
                })
                .catch(function (error) {
                  app.startingCity = "Invalid Zipcode"
                })
19 Nov
5 months ago

Jaikangam started a new conversation How To View The Inserted Pdf From The Form?

hi buddy i have inserted the pdf from the form upload and now i want to view the upload pdf. how do i do, need your help badly, Please some link of blog or youtube tutorial if you find camp across the best.

my pdf file is selected upload and it is in under public folder. I try to view it like image but not working. Help please

13 Nov
5 months ago

Jaikangam left a reply on How To Pass Foreign Key For Edit Instead Of Default Id?

@TAKDW - thanks for the clue, it is working.

Jaikangam started a new conversation How To Pass Foreign Key For Edit Instead Of Default Id?

Hi developer need your help badly.

I have two table Sale table (main table) and Service Table (if he choose the service save it) on the Service table there is sale id (foreign key).

eg. From the index listing ID =8 is passing for edit to the route

on the case of this on services table i have id = 5, sale_id = 8 """ something data

Controller below ``` public function edit($sale_id) { View::share(['page_name_active'=> 'sam_listsales']); $newvar = Service::findOrFail($sale_id); $servicesarray = $newvar->services;
    return view('sales.manager.services_edit', compact('newvar', 'servicesarray'));

}

Try this by those not work

Route::get('/sales/manager/services/edit/{sale_id}','SAM\[email protected]')->name('services.edit');

<p>How can i edit the service where the id doesnt not match, i want to get service by foreign key 
</p>
Help Please
09 Nov
5 months ago

Jaikangam left a reply on Cross-env Not Found On Npm Run Dev

after the hours of research i found the solution. here is how i did

  1. npm install cross-env -g
  2. npm update
  3. npm install --save

after that npm run dev or npm run build Boom! Laravel Mix Build Successful it is working.....

Jaikangam left a reply on Cross-env Not Found On Npm Run Dev

@VIPIN93 - nice thanks for share

Jaikangam started a new conversation How To Check The CheckBox In The Modal Where Data Is Passing By Ajax.

hi buddy i am finding for the solution for Editing the Data, where my code is using ajax and bootstrap modal. The DB data is successful pass to the edit Modal form but the checkbox is not check. How can i solve this, need your help badly

``` function editForm(id) { save_method = 'edit'; $('input[name=_method]').val('PUT'); $('#edit_modal-form form')[0].reset();
      $.ajax({
        url: "{{ url('/sales/manager/leadslistmanager') }}" + '/' + id + "/edit",
        type: "GET",
        dataType: "JSON",
        success: function(data) {
          $('#edit_modal-form').modal('show');
          //$('.modal-title').text('Edit Lead Details');
          $('#id').val(data.id);
          $('#ClientName').val(data.client_name);
          $('#inputlocation').val(data.location);
          $('#FirstVisitDate').val(data.firstvisitdate);  
          $('#MobileNo').val(data.mobile_number);
          $('#AlternateContactNo').val(data.mobile_number_alternate);
          $('#Email').val(data.email);
          $('#Occupation').val(data.occupation);
          
          //This is the checkBox value that wanted to be check in the edit form 
          $('#IsInternetUser').val(data.isinternetuser);
          
          $('#CurrentInternetProvider').val(data.provider_ifinternetuser);
          $('#inputAddress').val(data.address);
          $('#Remarks').val(data.remarks);
        },
        error : function() {
          alert("Something Error on  Data");
        }
      });
    }
15 Oct
6 months ago

Jaikangam left a reply on How To Get Selected The Array Value In The Form Multi Select Option While Editing The Form?

hooo yea what i am getting is not an array

 $servicesarray = Service::where('sale_id', $id)->select('services')->get();
change to 
 $servicesarray = Service::where('sale_id', $id)->select('services')->get()->toArray()

Finally solve thanks..

10 Oct
6 months ago

Jaikangam started a new conversation In_array() Expects Parameter 2 To Be Array, Object Given In Laravel Multi Select Option

hi How to solve this case, I have an array data coll $servicesarray which contain the inserted value from the user. Now i want to edit the array in the form multi select bootstrap

But i am getting the error Please look into my case

Jaikangam started a new conversation How To Get Selected The Array Value In The Form Multi Select Option While Editing The Form?

I am getting a problem and i cant find the solution to solve it. Please Help me if you can will be really thankful to you.

<input type="hidden" name="_token" value="{{ csrf_token() }}">
            <div class="panel-body"> 

              <select multiple required="" name="services[]" id="services" class="form-control listbox-no-selection">   
               @foreach ($servicesarray as $object)        
                <option value="BR"  {{ $object === 'BR' ? 'selected' : '' }}>Broadband  </option>
                <option value="DF"   >Dark Fiber </option>        
                <option value="LL"  >Leased Lines</option>      
                <option value="IP"  >Static IP</option>
                <option value="WD" >Website Domain</option>
                <option value="WH" >Website Hosting</option>       
              @endforeach
              </select>
              <br>
              <p>
                Hint : Ctrl + Left click for multiple select
              </p>
            
          </div>
         
          <input type="text" name="customername" id="customername" class="form-control" required placeholder="Enter Name " value=" {{ $servicesarray }} " readonly="">

For testing i make a form input value ={{ $servicesarray}}. The value out there is [{"services":["BR","WD","WH"]}]

public function edit($id)
    {
        $sales =  Service::find($id);
        $servicesarray = Service::where('sale_id', $id)->select('services')->get();
        
        //dd($servicesarray) is getting the value selected  from the form in the view. 
        
        
        return view('sales.manager.services_edit', compact('sales', 'servicesarray'));
    
    }

What i want the result is to get value of selected in the select option So that i can edit it the value.

Jaikangam left a reply on How To Write Code In Laracast?

''' Testing testing '''

08 Oct
6 months ago

Jaikangam left a reply on Inserting Data To User

Check in the model add the $fillable, make sure that you made a relationship between role and user.

Jaikangam left a reply on Namespace Declaration Statement Has To Be The Very First Statement

Thanks i too have a whitespace before <?php Remove the whitespace before <?php Run its works fine now....

07 Sep
7 months ago

Jaikangam left a reply on How To Push The Laravel Project To Server Using PuTTy In Window System?

@sergiu17 any good resource suggestion for LEMP stack ?

05 Sep
7 months ago

Jaikangam started a new conversation How Many Laracon Conference Are There In A Single Year? Laracon US And EU Which One Is Bigger?

As of i know, there is a Laracon US, Laracon EU and Laracon Australia. I did like to know which is bigger out of this three and which month it held ?

And is there any more Laracon Confernce not other then this three coming up?

Curious to know Laravel Community and keep in touch.
03 Sep
7 months ago

Jaikangam left a reply on Blog Application In Laravel 5 Tutorials

Application error might be hosting plan is over.

Jaikangam left a reply on How Can I Run Laravel 5.4 (Php Ver 5.6) Project Cloneing Someone, I Am Using Laravel 5.6 (php Ver 7.2)???

@twindots I am using wamp (windows). Php 7.2 ver and laravel Ver 5.7. I found the someone project which is laravel 5.4 Php ver 5.6, i clone it and composer install but not able to run it.

Jaikangam started a new conversation How Can I Run Laravel 5.4 (Php Ver 5.6) I Am Using Laravel 5.6 (php Ver 7.2)???

try many time but cant find the solution what might be the reason..

Jaikangam started a new conversation Inserting Values Into Foreign Key Table And Primary Key Table

I have two tables and i have to insert values into these two tables such that a record in primary table is associated with several records in foreign key table. Pls help me.god bless you

class CreateThievesTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('thieves', function (Blueprint $table) {
            $table->increments('id');
            $table->string('name');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('thieves');
    }
}

Another Table here

class CreateCarsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('cars', function (Blueprint $table) {
            $table->increments('id');
            $table->string('name');

            $table->integer('thief_id')->unsigned()->index()->nullable();
            $table->foreign('thief_id')->references('id')->on('thieves');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('cars');
    }
}

Assume i have already inserted the value in the thief table now i want to insert Cars table but its getting me saying car undefine.

On the Car Controller ``` public function store(Request $request) {
    $car->thief()->associate($thief)->save();
}

01 Sep
7 months ago

Jaikangam left a reply on How The Point(Experience) Is Counted In Laracasts ?

@Sergiu17 ok thanks lets see i will give you best answer. Exp 168,700 before the best answer.

Jaikangam started a new conversation How The Point(Experience) Is Counted In Laracasts ?

Best answer reward how much xp??

Jaikangam started a new conversation What Front End Framework Is Use In Laracasts ?

Wonder it might be Vue js or ??

Curious to know
30 Aug
7 months ago

Jaikangam left a reply on How Could You Post Part Of Code On Laracast ??

function test() {
  console.log("notice the blank line before this function?");
}

Jaikangam started a new conversation How To Pass Id Dynamic From One Table To Store Into Another Table ?

Sorry if my question is inproper, what my question is i have two table sales and services.

I have foreign key sale_id in the services table, I make a relationship between two table

here is my relationship

 
class Sale extends Model
{
     protected $fillable = [
       'cefno','c_name','i_address','c_address','mobile_number', 'alt_number','landline_no','email','dor','priority','remarks',
    ];
public $primaryKey = 'id';

 public function services()
{
    return $this->hasMany('App\Service', 'sale_id', 'id');
}

}

class Service extends Model { protected $casts = [ 'services' => 'array', ];

protected $fillable = [
   'services',
];



public $primaryKey = 'id';

public function sales() { return $this->belongsTo('App\Sale', 'sale_id', 'id'); }

}

on the above My controller to store services in the services table


     
       <input type="hidden" name="_token" value="{{ csrf_token() }}">
        <div class="panel-body">                            
          <select multiple required="" name="services[]" id="services" class="form-control listbox-no-selection">               
            <option value="BR">Broadband  </option>
            <option value="DF">Dark Fiber </option>               
            <option value="LL">Leased Lines</option>                
            <option value="IP">Static IP</option>
            <option value="WD">Website Domain</option>
            <option value="WH">Website Hosting</option>                
          </select>
          <br>
          <p>
            Hint : Ctrl + Left click for multiple select
          </p>
        </div>

      </div>
      <!-- /multiple selection -->
      
      <div class="text-left">
        <a href="{{url('/sales/manager/showregisterbroadbanduser')}}" class="button-back btn btn-default legitRipple"><i class="icon-arrow-left13 position-left"></i> Back</a>
        <button type="submit" class="btn btn-success" >Submit & Add Service (s) Detail <i class="icon-arrow-right14 position-right"></i></button>
      </div>
      <br><br>

    </form>

on above is my view


 public function store(Request $request)
    {
    $newvar = $request->input('services');
    $newvar = array_unique($newvar);

    $sale = Sale::find(1);

    
    foreach($newvar as $tag){
     
     $sale->services()->create(['services' => $tag]);

     //$sale->save();
 }
Session::flash('success',' Form successfully Submitted');

 return back(); return redirect()->back();

On the above i am able to store the sale_id into the services table which is id '1' only. I am using resource route

What my Question is, i want to store the sale_id Dynamically.

need your help badly

Jaikangam left a reply on How To Insert Abc Table Primary Key Id Into Foreign Key Of Another Table?

$sale = Sale::find(1); // do you get the sale id from the Request??

foreach($newvar as $tag) { $sale->services()->create(['services' => $tag]); }

29 Aug
7 months ago

Jaikangam left a reply on How To Insert Abc Table Primary Key Id Into Foreign Key Of Another Table?

@tykus thanks... your code is working but how do i need to pass the id dynamic ??

Jaikangam left a reply on How To Insert Abc Table Primary Key Id Into Foreign Key Of Another Table?

@tykus i am not able to pass id from the sales table to sale_id. how to pass dynamical $sale = Sale::find(1); \Auth::user()->id; this work if using user table by here on sale table i am not getting it

Jaikangam started a new conversation How To Insert Primary Key Id Into Foreign Key Of Another Table?

Sorry if my question is inproper, I have two table ie sales table and services table. I created the foreign key "sale_id" on services table

 Schema::create('services', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('sale_id')->unsigned(); 
            $table->string('services');
            $table->timestamps();
        $table->foreign('sale_id')
                    ->references('id')
                    ->on('sales');
    });

And i have made a relation on sale model

 
class Sale extends Model
{
     protected $fillable = [
       'cefno','c_name','i_address','c_address','mobile_number', 'alt_number','landline_no','email','dor','priority','remarks',
    ];
public $primaryKey = 'id';

 public function services()
{
    return $this->hasMany('App\Service', 'sale_id');
}

}

here is my controller to insert sale_id (FK) in services table

 
 public function store(Request $request)
    {
    $newvar = $request->input('services');
    $newvar = array_unique($newvar);

    $project = Sale::find(1);
    
    foreach($newvar as $tag){
     $comics = new Service();
     $comics->sale_id= $request->$project;
     $comics->services=$tag;

     $comics->save();
 }

Session::flash('success',' Form successfully Submitted');

 return back(); return redirect()->back();

}

If inserting from user model then this works $something->user_id = \Auth::user()->id; But in my case $something->sale_id =..........??? need your help badly my code doesnt work

28 Aug
7 months ago

Jaikangam left a reply on How Do I Get Primary Id On Another Table ??

@Snapey how do i do? to get the sale_id which is foreign key in service table. want to pass the primary key id (salergistrationmaster table) to service table sale_id.

Jaikangam left a reply on How Do I Get Primary Id On Another Table ??

@skimuli still error General error: 1364 Field 'sale_id' doesn't have a default value

Jaikangam started a new conversation How Do I Get Primary Id On Another Table ??

I am not able to get the primary ID, how do i do... need your help badly I have "saleregistrationmaster" table and "service" table

on the salesregistrationmaster table i have $table->increments('id'); $table->string('cefnumber')->nullable(); $table->string('customername',50); $table->text('install_address'); $table->text('correspondent_address')->nullable(); $table->string('mobile_number'); $table->string('alt_number')->nullable(); $table->string('landline_no')->nullable(); $table->string('email')->unique(); $table->date('dor'); $table->string('priority'); $table->string('remarks')->nullable();

and on the services table

Schema::create('services', function (Blueprint $table) { $table->increments('id'); $table->integer('sale_id')->unsigned(); $table->string('services'); $table->timestamps(); $table->foreign('sale_id') ->references('id') ->on('salesregistrationmasters') ->onUpdate('cascade')->onDelete('cascade'); }); ====================================== on my service model i use belongTo relation but doesnt work class Service extends Model { protected $casts = [ 'services' => 'array', ];

protected $fillable = [
   'services',
];


public function salesregistration()
{
    return $this->belongsTo(Salesregistrationmaster::class);
}

}

When i insert form services i want to get the sale_id from the salesregistrationmaster table. How can i do it ??

16 Aug
8 months ago

Jaikangam left a reply on How To Insert Array Element Of Multi Select Data Into A Single Column ?

Finally got the solution, from the view bootstrap multi select is sending value twice into the database. so added the "array_unique($xxx);" to the controller to fliter getting twice into db.


$newvar= $request->input('services');
$newvar = array_unique($newvar);

$newvar= implode(',', $newvar); $input['services'] = $newvar; Service::create( $input); dd(Input::get('services'));

Now it is fine, working as i wanted to. Hope it help for other too if someone came across like this. Happy codding.......