llamorin.jason

llamorin.jason

Member Since 2 Years Ago

Experience Points 510
Experience
Level
Lessons Completed 1
Lessons
Completed
Best Reply Awards 0
Best Answer
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.

15 Apr
1 year ago

llamorin.jason left a reply on Laravel /passport And Postman Gets All The Time ⌚ Unauthorised

add this to your htacess

RewriteCond %{HTTP:Authorization} ^(.*) RewriteRule .* - [e=HTTP_AUTHORIZATION:%1]

solves my problem when using POSTMAN seems like Authorization Header is block by a module in apache.

llamorin.jason left a reply on Laravel Passport Password Grant Type Custom Error Message

Hi @hellorrr , @craigpaul solution is great but not the best solution, when you want to return the error in json in the response. If you are using guzzle just add 'http_errors' => false in the configuration like this.

` $http = new GuzzleHttp\Client;

    $response = $http->post('http://restapi.dev/oauth/token', [
        'form_params' => [
            'grant_type' => 'password',
            'client_id' => 3,
            'client_secret' => 'Lh66IODOP4pZHF676xZA8ghQiIt9OepqYHVzFEIN',
            'username' => $username,
            'password' => $password,
            'scope' => '',
        ],
        'http_errors' => false // add this to return errors in json
    ]);
    

return json_decode((string) $response->getBody(), true);`

04 Jul
2 years ago

llamorin.jason left a reply on Laravel Installation With Composer Error

reinstall composer or you can update it

llamorin.jason left a reply on Problem Understanding Javascript

it refers to the element you have enclose in a function for example

$("#form-signin").submit(function(event){
                    $.ajax({
                            url: $(this).attr('action'),
                            data: $(this).serialize(), 
                            type: "POST",
                            dataType: 'json',
     
            
            });
    });

In this example $(this) refers to id form-signin.

llamorin.jason left a reply on Need Help With Query In Db With Huge Row

$products = Product::where('buyer', 0)->where('cat_id', 1)->get();
$keyby = $products->keyBy('product_id');
//remove this  $keyby->all();
 $datas= gzcompress($keyby);
$params = base64_encode($this->_fnEncrypt($datas, $this->user->key));

llamorin.jason left a reply on Change Response After Login Or Registration

check if email exist or the password is correct, you can test one by one the request for you to know what is wrong with your code

llamorin.jason left a reply on Dont Redirect After Login/register On Laravel

Quick hack go to your vendor/laravel/src/illuminate/framework/foundation/authenticateusers.php

 protected function handleUserWasAuthenticated(Request $request, $throttles)
    {
        if ($throttles) {
            $this->clearLoginAttempts($request);
        }

        if (method_exists($this, 'authenticated')) {
            return $this->authenticated($request, Auth::guard($this->getGuard())->user());
        }
/** Add this for json response
        if ($request->ajax()) {
              return response()->json(
                  [
                  'ok' => true,
                  'success' => true,
                  'redirect' => $this->redirectPath()
                  ], 200
              );
        };

        return redirect()->intended($this->redirectPath());
    }

llamorin.jason left a reply on Rewriting/adding Another Action() Method

Is the controller method exist? If not then create it and it is a good practice to assign it to the routes.

llamorin.jason left a reply on How To Name Laravel 5.2 Auth Routes

@heihachi88 it is located at vendor\laravel\framework\src\Illuminate\Foundation\Auth\AuthenticatesUsers;

30 Jun
2 years ago

llamorin.jason left a reply on Server Does Not Support Diffie-hellman-group1-sha1 For Keyexchange

public function handle($request, Closure $next) { if (Auth::check() && Auth::user()->isAdmin()) { return $next($request); }

    return redirect('/profile');
}

llamorin.jason left a reply on Mysql Query For SUM

``php

$count = App\Flight::where('active', 1)->sum();

here are other example, just use chaining in query builder

$count = App\Flight::where('active', 1)->count();

$max = App\Flight::where('active', 1)->max('price');

llamorin.jason left a reply on Storing A One-to-one Relationship

Try the inverse

public function user() { return $this->belongsTo('App\User'); }