Hadayat

Hadayat

Member Since 1 Month Ago

Mianwali

Experience Points
410
Total
Experience

4,590 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 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
410 XP
May
07
3 weeks ago
Activity icon

Replied to Error Unable To Prepare Route [api/user] For Serialization. Uses Closure.

@zylwin You are right. I disabled in Api.php and it works for me. Thank you very much dear.

Activity icon

Replied to Error Unable To Prepare Route [api/user] For Serialization. Uses Closure.

My Route File

Route::get('/send', '[email protected]');
Route::get('/sendmail', '[email protected]');
Activity icon

Replied to Error Unable To Prepare Route [api/user] For Serialization. Uses Closure.

I am not using any closure but it throw closure exception

 Unable to prepare route [api/user] for serialization. Uses Closure.
May
06
3 weeks ago
Activity icon

Replied to Laravel Socialiteauth Error: Error=redirect_uri_mismatch&error_description=The+redirect_uri+MUST+match+the+registered

@michaloravec Thanks for your response. I follow your code but now it through another error

Client error: `GET https://api.github.com/user` resulted in a `401 Unauthorized` response: { "message": "Bad credentials", "documentation_url": "https://developer.github.com/v3" }

My Credentials are correct.

May
05
3 weeks ago
Activity icon

Started a new Conversation Laravel Socialiteauth Error: Error=redirect_uri_mismatch&error_description=The+redirect_uri+MUST+match+the+registered

I am getting this error when I am redirected to the Github.

My Routes File

Route::get('login/github', 'Auth\[email protected]');
Route::get('login/github/callback', 'Auth\[email protected]');

My Services file

'github' => [
        'client_id' => env('GITHUB_CLIENT_ID'),
        'client_secret' => env('GITHUB_CLIENT_SECRET'),
        'redirect' => 'https://github.com/settings/applications/1282338',
    ],

My env file

GITHUB_CLIENT_ID=2dbe6brandomplaced7b63cf6d
GITHUB_CLIENT_SECRET=a8bc340randomplaced025f4b848f7f765b008

My Login Controller

 public function redirectToProvider()
    {
         return Socialite::driver('github')->redirect();
    }
    public function handleProviderCallback()
    {
        $user = Socialite::driver('github')->user();
        dd($user);
    }

Please suggest me why this error is occured.

Apr
30
1 month ago
Activity icon

Replied to I Am Integrating Paypal Into My Web App And App Through This Error "Trying To Access Array Offset On Value Of Type Null"

Before this error it shows another error "Cannot Send Mail - The sender address was invalid." but my credentials are correct.

Apr
29
1 month ago
Activity icon

Started a new Conversation I Am Integrating Paypal Into My Web App And App Through This Error "Trying To Access Array Offset On Value Of Type Null"

My Payment Controller

namespace App\Http\Controllers;
use PayPal\Rest\ApiContext;
use PayPal\Auth\OAuthTokenCredential;
use Illuminate\Http\Request;
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;
use URL;
use Redirect;
use Session;

class PaymentController extends Controller
{
//    private $_api_context;
    public function __construct()
    {
        /** PayPal api context **/
        $paypal_conf = \Config::get('paypal');
        $this->_api_context = new ApiContext(new OAuthTokenCredential(

/=================through error from this line================/

                $paypal_conf['client_id'],
                $paypal_conf['secret'])
        );
        $this->_api_context->setConfig($paypal_conf['settings']);
    }

My Config/paypal.php file

<?php
return [
    'client_id' => env('PAYPAL_CLIENT_ID',''),
    'secret' => env('PAYPAL_SECRET',''),
    'settings' => array(
        'mode' => env('PAYPAL_MODE','sandbox'),
        'http.ConnectionTimeOut' => 30,
        'log.LogEnabled' => true,
        'log.FileName' => storage_path() . '/logs/paypal.log',
        'log.LogLevel' => 'ERROR'
    ),
];

Any one tell me about why this array return null, Advance Thanks

Apr
13
1 month ago
Activity icon

Started a new Conversation I Am Using Cviebrock Library For Laravel Slug But Stuck In Error Undefined Index: Separator

My Model


use Illuminate\Database\Eloquent\Model;
use Cviebrock\EloquentSluggable\Sluggable;
use Cviebrock\EloquentSluggable\SluggableScopeHelpers;
class Post extends Model
{
    use SluggableScopeHelpers;
    use Sluggable;
    public function sluggable()
    {
        return [
            'slug' => [
                'source' => 'title',
                'onUpdate' => true
            ]
        ];
    }

Added this class in config/app.php

Cviebrock\EloquentSluggable\Services\SlugService::class,

My column name is slug in posts

Apr
08
1 month ago
Activity icon

Replied to I Am Using Laravel Slug Error "Undefined Index: Separator"

@frankincredible Got it, Can you please provide me guidelines about the slug. I follow the documentation but failed.

Apr
07
1 month ago
Activity icon

Started a new Conversation I Am Using Laravel Slug Error "Undefined Index: Separator"

Hello Guys i am using laravel slug. it's throw an error "Undefined index: separator", Can anyone guide me.

Or provide me complete step by step guidence.

I am using this link but can't understand how to add slug in URL
https://github.com/cviebrock/eloquent-sluggable
Apr
02
1 month ago
Activity icon

Replied to CSS Styles Not Applied

Hello @computermaverick

You are adding the style sheet in the layouts, but for execution of these style sheet, you need to call these style sheets.

Like this:

@section ('title')
@endsection 

@section ('style')
@endsection 
Activity icon

Replied to Build Relation Of Two Table And Apply OnDelete('cascade). It's Not Working

It's works for me. Thanks dear you made my day.

Activity icon

Replied to Build Relation Of Two Table And Apply OnDelete('cascade). It's Not Working

 public function up()
    {
        Schema::create('posts', function (Blueprint $table) {
            $table->id();
            $table->integer('user_id')->index();
            $table->integer('category_id')->unsigned()->index();
            $table->integer('photo_id')->unsigned()->index();
            $table->string('title');
            $table->string('body');
            $table->timestamps();

            $table->foreign('user_id')->references('id')->on('users')->onDelete('cascade');
        });
    }
Activity icon

Started a new Conversation Build Relation Of Two Table And Apply OnDelete('cascade). It's Not Working

Hello Guys,

I am building the relation b/w two tables and apply the onDelete method but it' not work for me.

Error:

SQLSTATE[HY000]: General error: 1005 Can't create table laravel_cms.posts (errno: 150 "Foreign key constraint is incorrectly formed") (SQL: alter table posts add cons traint posts_user_id_foreign foreign key (user_id) references users (id) on delete cascade).

Please read these line before answering.

  1. My primary key and foreign key has same data type and same size.
  2. I have index box columns.
  3. I assign nullable method to foiegn key but it does't work.
  4. I also assign unsigned method to foreign key but it does't work.
  5. My column has same schema object.
Apr
01
2 months ago