Asad

Asad

Member Since 9 Months Ago

karachi

Web Developer at Qubolt

Experience Points 510
Experience Level 1

4,490 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 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.

17 Mar
1 month ago

Asad started a new conversation Updating User Role_id In Laravel

This is mine Condition i am not filling any form for User Credential i want to do it Hard Coat id this is this then user Role Id shall be changes how can i achieve this

if($pickedPlan="Medium"){
                    $id=Auth::user()->id;
                    $user=User::find($id);
                    $user->role_id=2;
                    $user->save();
         }

I have tried to run this code its not working thanks in Advance

Asad left a reply on Laravel Image Is Not Appearing On Browser

wait let me try this and see if tis working

Asad started a new conversation Laravel Image Is Not Appearing On Browser

I am showing the user profile picture like this when i upload the profile picture

This is how i am trying to show the image in the Browser

            src="/storage/avatars/{{ $user->image }}"

this is appearing in the Console

        <img height="150px;" src="/storage/avatars/1_avatar1552869006.jpg" class="curve-circle">

It is showing that the Profile picture is coming to browser but why its not rendering in the browser

17 Feb
2 months ago

Asad left a reply on SQLSTATE[HY000]: General Error: 1364 Field 'gsuppliers' Doesn't Have A Default Value (SQL: Insert Into `gdistributors` (`name`, `slug`, `cnic`, `email`, `phone`, `image`, `user_id`, `updated_at`, `created_at`) Values (Testing, Testing, 21, [email protected]

yes i was doing it right but stills the same problem <select name="suppliers[]" id="supplier"

when i am doing

app\gdistributor->find(1)->gsuppliers

Its Returning "1"

I have insert the data through mysql but its not returning an Array i think thats the Problem but how can i Solve this

11 Feb
2 months ago

Asad left a reply on Class DistributorController Doesr Not Exist

the above one i working but i want to do this like prefix namespace style

Asad started a new conversation Class DistributorController Doesr Not Exist

This is mine Controller

                        Distributor  >>  DistributorController

This is mine Route on Web.php

           Route::group(['as'=>'Distributor.','prefix' => 'Distributor','namespace'=>'Distributor'], function () {
                      Route::get('/index','[email protected]')->name('index');
                  });

When i am accessing the url its gaving me error Distributor/DistributorController does not exist

This is mine View Structure

       Distributor>>index.blade.php

           Thanks All friends in Advance please help me!!!
26 Aug
7 months ago

Asad left a reply on Route [home.index] Not Defined In Urlgenrator 304

I am using Laravel 5.4

Asad left a reply on Route [home.index] Not Defined In Urlgenrator 304

Cronix not helping bro!!

Asad started a new conversation Route [home.index] Not Defined In Urlgenrator 304

This is mine Error. https://gyazo.com/ebbd2902e4a43ef67db2a916c36b608a

This is mine Code in form of screenshot of web.php and written down too https://gyazo.com/509c0e1fc703170f3b5b170f549a4f52

Route::group(['prefix'=>'admin', //If i change this to gaffer then Only the content will be avalable 'middleware'=>'auth', 'namespace'=>'admin'],function(){

            //Here i have use [email protected] 
            //because there is no model for this thats why
            // i have included its name and Index function 
            //and its a simple controller and no Resource controller

            Route::get('dashboard',
            '[email protected]')
            ->name('admin.dashboard');

            // Route::get('dashboard','[email protected]') - 
           >name('admin.dashboard');

            //its Slider model is maked first or its Controller was made with Migrations 
            thats
            //why is available thats  and no need to call for index function
            Route::resource('slider',
            'SliderController');
16 Jul
9 months ago

Asad started a new conversation Stripe Cannot Get Token

This is i have included in my head

       <script src="https://js.stripe.com/v3/"></script>

This is mine Form

           <form action="/payment" method="post" id="payment-form">
          {{csrf_field()}}
           <div class="form-row">
            <label for="card-element">
              Credit or debit card
             </label>
             <div id="card-element">
               <!-- A Stripe Element will be inserted here. -->
              </div>
      
               <!-- Used to display Element errors. -->
              <div id="card-errors" role="alert"></div>
            </div>
      
            <button>Submit Payment</button>
          </form>

This is mine script

  var stripe = Stripe('pk_test_kzEtBzSaYTdH861psURrqZR1');
  var elements = stripe.elements();



 var style = {
base: {
// Add your base input styles here. For example:
fontSize: '16px',
color: "#32325d",
}

};

// Create an instance of the card Element. var card = elements.create('card', {style: style});

// Add an instance of the card Element into the card-element . card.mount('#card-element');

card.addEventListener('change', function(event) { var displayError = document.getElementById('card-errors'); if (event.error) { displayError.textContent = event.error.message; } else { displayError.textContent = ''; } });

var form = document.getElementById('payment-form'); 
form.addEventListener('submit', function(event) {
  event.preventDefault();

 stripe.createToken(card).then(function(result) {
 if (result.error) {
   // Inform the customer that there was an error.
   var errorElement = document.getElementById('card-errors');
    errorElement.textContent = result.error.message;
   } else {
  // Send the token to your server.
   stripeTokenHandler(result.token);
  }
 });

}); function stripeTokenHandler(token) { // Insert the token ID into the form so it gets submitted to the server console.log(token);

  var form = document.getElementById('payment-form');
  var hiddenInput = document.createElement('input');
  hiddenInput.setAttribute('type', 'hidden');
  hiddenInput.setAttribute('name', 'stripeToken');
  hiddenInput.setAttribute('value', token.id);
  form.appendChild(hiddenInput);

 // Submit the form
//   form.submit();

}

Asad started a new conversation Use PayPal\Api\Item; Error Because I Have Already Error Model And Getting Data From There What To Do Now

use App\Item;

use PayPal\Api\Amount; use PayPal\Api\Details; use PayPal\Api\Item; use PayPal\Api\ItemList; use PayPal\Api\Payer; use PayPal\Api\Payment; use PayPal\Api\RedirectUrls; use PayPal\Api\Transaction;

Asad started a new conversation Having Route Problem In Laravel Route [Home.checkout] Not Defined. (View: C:\xampp\htdocs\mammaskitchen\resources\views\welcome.blade.php)

<a href="{{route('Home.checkout',$item->id)}}">


    public function index()
{
    $categories=Category::all();
    $items=Item::all();
    $sliders=Slider::all();
    return view('welcome',compact('sliders','categories','items'));
}
public function checkout(){
    $item=Item::find($id);
    return $item;
}

Route::get('/','[email protected]')->name('welcome');

Route [Home.checkout] not defined. (View: C:\xampp\htdocs\mammaskitchen\resources\views\welcome.blade.php)