alishahUK

alishahUK

Member Since 4 Years Ago

Experience Points 52,670
Experience Level 11

2,330 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 653
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] 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.

12 Jul
6 days ago

alishahUK left a reply on Liskov Substitution Principle

Thank you @sergiu17 , I think that makes more sense. Much appreciated

alishahUK left a reply on File In Console Directory Loses Value Inside Another Function?



  protected $accessToken;
  public function __construct()
  {
    // shouldn't this be assigned as a class property
    // rather than method property
    $this->accessToken = config('values.accessToken');
    parent::__construct();
    }
  ...
  public function commandWork() {
        $token = $this->accessToken; //equals null?
         dd($token); //returns null?
         ...
  }

alishahUK left a reply on Liskov Substitution Principle

hey @bobbybouwmann, thanks for your reply and what would be the violation ??

11 Jul
1 week ago

alishahUK started a new conversation Liskov Substitution Principle

Hey guys,

I am trying to come up with a real world example for Liskov substitution principle in an ecommerce application context. Now I understand the principle, however, I am struggling to come up with a really good use case. Can any body help out, please?

23 Nov
7 months ago

alishahUK left a reply on Foundation, Bootstrap Or Other

I would say look into tailwind.css , which is a utitly based library. It will help in reducing your css bundle and actually help in coding faster. Foundation and bootstrap are great frameworks, but they come with a lot of baggage

22 Nov
7 months ago

alishahUK left a reply on Object Of Class Closure Could Not Be Converted To String

You have run the query but haven't asked to return any thing ?? try

$query->distinct()
    ->join('drilldown_boards_items AS dbi', 'dbi.board_item_id', '=', 'available_boards_items.id',function ($join) {
        $join->on('user_boards_items AS ubi', 'ubi.board_item_id', '=', 'available_boards_items.id');
    })
    ->addSelect(DB::raw(("AND uib . user_name = '[email protected]'")))
    ->addSelect('dbi.board_item_id')
    ->addSelect('name')
    ->addSelect('label')
    ->addSelect('is_dashboard')
    ->addSelect('is_scoreboard')
    ->addSelect(DB::raw('(CASE WHEN ubi.user_name IS NULL THEN 0 ELSE 1 END) AS is_selected'))
    ->orderBy('label', 'desc')
    ->get();

alishahUK left a reply on A Error In Laravel-5-boilerplate

Hi ya, Please pay attention to the namespace. Your trait is located at

   App\Models\Article\Traits\Relationship

But where ever you are using , as from the error page you have provided, its trying to use

 App\Models\Auth\Traits\Relationship

Hope that fixes it

09 May
2 years ago

alishahUK left a reply on How To Secure An Internal API From Public?

@douglas_quaid

Well I think to make sure that it is an internal api call, you would have a simple middleware which would check the ip address and see if the api call is being made from same api. hope that helps

27 Apr
2 years ago

alishahUK left a reply on Access To API Via A Guest Account With Abilities

I would suggest to take the middleware out and use it in controllers' constructor function where you can specify which routes should be protected and which routes can be accessed without being logged in.

Here is the link for video where Jeffrey talks about middleware

https://laracasts.com/series/laravel-5-from-scratch/episodes/14

alishahUK left a reply on Formulaire

I think you need to bind your form to model as your Laravel Collective give you that method so maybe something like below

{!! Form::model($post, ['route' => ['news.update', $post->id]]) !!}

Hope that helps

alishahUK left a reply on How To Secure An Internal API From Public?

Hi ya,

I am sure I am quite late to the party. However, I had been stuck myself in an exactly same situation and was trying to figure out a way where I could achieve the same results as described by @aligajani . I am writing my solution and understanding of it for any body who might need it.

After quite a bit of research and understanding how JWT works which by the way I still need to research a bit more to fully understand it. However, to get an overview I can't find a better article to explain in simple words other than https://scotch.io/tutorials/the-anatomy-of-a-json-web-token.

Now, once I understood how JWT works, it was easy for me to wrap my head around the whole flow. So here is how I approached it. As I am working on an internal API for my company, I created a middleware to check whether a request to certain endpoints is coming from whitelisted API which you can easily get from $request->api().

Then I installed the excellent package by tymondesigns at https://github.com/tymondesigns/jwt-auth. I followed the installation and generated the secret key. Now here comes the fun part.

I wanted the end points to be secured without needing for me to be logged in, hence I created my own middleware where I grabbed certain user from my users table and created a JWT token from that user object.

$user = App\User::whereEmail('email')->first() $token = JWTAuth::fromUser($user);

once I got the token all I needed to do was to call my end point i.e. /api/v1/users?token={generatedToken} and voila !!! all good to go. However, we also need to refresh the token after certain time, which again the package thankfully provide two middlewares

jwt.auth and jwt.refresh

jwt.auth midleware tries to create token using authenticate method through credentials, so i swapped it for my middleware where I authenticate user as above and jwt.refreshes the token.

If you read the article I mentioned and then read the package wiki it will all make sense. Cheerio !!

12 Aug
2 years ago

alishahUK left a reply on [Laravel 5.3] Error On Gulp Execution

I am having same problem :(

20 Nov
4 years ago

alishahUK left a reply on Database Connection To SQL SERVER 2012

Right after researching for few days, bumped into this brilliant article about how to connect to SQL SERVER. I hope it might help some one and save him the amount of time i spent trying to figure out how to do it. http://www.joecjr.com/2014/07/27/install-and-use-freetds-unixodbc-and-rodbc-or-pyodbc/.

18 Nov
4 years ago

alishahUK left a reply on Connect Laravel To Microsoft SQL

@Houbsi sorry mate didnt mean to spam your discussion. As the topic was already getting discussed here thats why posted. Hope you dont mind

alishahUK left a reply on Connect Laravel To Microsoft SQL

Thanks maxime for your help. However, I installed them drivers on the windows that i am running on parallel desktop on my IMAC. Its really frustrating because i have never tried to connect to a SQL Server before. I even tried the OBDC Driver but there is no step by step instructions as how to do it properly. If you do know of any step by step instructions then please let me know. I would really appreciate as its driving me crazy :(

alishahUK left a reply on Database Connection To SQL SERVER 2012

Ok for some reason my question decided to post itself 4 times :(. sorry guys no idea how that happened. As fas i know all i need to do is to provide the parameters as i have shown in the code above and i should be good to go. but its just not working for me :(

alishahUK started a new conversation Database Connection To SQL SERVER 2012

I am trying to connect to SQL Server 2012. I have already changed the default from 'mysql' to 'sqlsrv' in my app.php file and have also provided the following connection parameters

'sqlsrv' => array(
            'driver'   => 'sqlsrv',
            'host'     => '192.***.**.*',
            'database' => 'Database name',
            'username' => 'Username',
            'password' => 'password',
            'prefix'   => '',
        ),

I have tried all sorts but i am getting the pdo exception of driver not found. what am i doing wrong ?? Please help

alishahUK started a new conversation Database Connection To SQL SERVER 2012

I am trying to connect to SQL Server 2012. I have already changed the default from 'mysql' to 'sqlsrv' in my app.php file and have also provided the following connection parameters

'sqlsrv' => array(
            'driver'   => 'sqlsrv',
            'host'     => '192.***.**.*',
            'database' => 'Database name',
            'username' => 'Username',
            'password' => 'password',
            'prefix'   => '',
        ),

I have tried all sorts but i am getting the pdo exception of driver not found. what am i doing wrong ?? Please help

alishahUK started a new conversation Database Connection To SQL SERVER 2012

I am trying to connect to SQL Server 2012. I have already changed the default from 'mysql' to 'sqlsrv' in my app.php file and have also provided the following connection parameters

'sqlsrv' => array(
            'driver'   => 'sqlsrv',
            'host'     => '192.***.**.*',
            'database' => 'Database name',
            'username' => 'Username',
            'password' => 'password',
            'prefix'   => '',
        ),

I have tried all sorts but i am getting the pdo exception of driver not found. what am i doing wrong ?? Please help

alishahUK started a new conversation Database Connection To SQL SERVER 2012

I am trying to connect to SQL Server 2012. I have already changed the default from 'mysql' to 'sqlsrv' in my app.php file and have also provided the following connection parameters

'sqlsrv' => array(
            'driver'   => 'sqlsrv',
            'host'     => '192.***.**.*',
            'database' => 'Database name',
            'username' => 'Username',
            'password' => 'password',
            'prefix'   => '',
        ),

I have tried all sorts but i am getting the pdo exception of driver not found. what am i doing wrong ?? Please help

alishahUK left a reply on Connect Laravel To Microsoft SQL

Hi there, I have been trying to sort out this issue for past week and no luck so far.. I developed the database locally using mysql and now trying to move the application to SQL SERVER 2012 at work and i am getting PDO Exception (Driver not found). Could some one help please ??