Pirate

Pirate

Member Since 1 Year Ago

Experience Points 360
Experience Level 1

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

26 Jan
1 year ago

Pirate left a reply on Parse Error: Syntax Error, Unexpected '$j'

@ehtasham

i have used variable {{ $j = $i+1 }} of this type its not getting increment whether the used variable is right

@for($i=0; $i<sizeof($property); $i++)  

                <div class="photo" id="photo_{{ $property[$i]->category_id }}" style="display:none;">

                    {{ $j = $i+1 }}
                      
<strong>{{ $attr[$i]->{'attribute_'.$j} }}<strong><br>

  {!! Form::text('productvalue_[$j]') !!}<br>
                                                               
                               </div>
                         
            @endfor

Pirate left a reply on Parse Error: Syntax Error, Unexpected '$j'

@ehtasham

Parse error: syntax error, unexpected '.', expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$'

Pirate left a reply on Parse Error: Syntax Error, Unexpected '$j'

@Shawdow

Parse error: syntax error, unexpected '"work_"' (T_CONSTANT_ENCAPSED_STRING), expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$'

Pirate started a new conversation Parse Error: Syntax Error, Unexpected '$j'

Hi,

I trying to access a column work_1, work_2, ...etc. to get the values from the database.

@for($i=0; $i<sizeof($property); $i++)  

                <div class="photo" id="photo_{{ $property[$i]->category_id }}" style="display:none;">

// This is to get the incremented value.
                    {{ $j = $i+1 }}
                        <strong>{{ $property[$i]->work_$j }}<strong><br>
  {!! Form::text('productvalue_[$j]') !!}<br>

                                                               

                               </div>
                         
            @endfor

Thanks.

04 Jan
1 year ago

Pirate left a reply on How To Create A New Table And Desired Attributes And 'model For That Table' Only Through Code Not By Using Terminal In Laravel.??

@Snapey

Can you please show me one example for the creation of text file and how to implement it. So that I can implement it in my project that I am working on.

Pirate left a reply on How To Create A New Table And Desired Attributes Only Through Code Not By Using Terminal In Laravel.??

@Snapey

Thanks for the above code examples..

Onther question arises for me, is it possible to create a model for that perticular crated table through code itself.. .

03 Jan
1 year ago

Pirate left a reply on How To Create A New Table Through Code.??

@zion @topvillas

Thanks but I have refered both of your links

The docs say like we have to do it by manually. In the sense I have to manually do it by using the terminal.

Please is it possible to write a snippet or code in controller or in any file to automatically create a new table with desired attributes, not by using terminal.

I hope anyone can help me out.

Pirate started a new conversation How To Create A New Table Through Code.??

I want to create a new table in laravel project.. I don't want to it manually by me.

Is it possible to write a code that handles the creation of the tables and the attributes for that table.!??

Is it possible in laravel using MYSQL as my database.??

08 Dec
1 year ago

Pirate left a reply on Cannot Use Object Of Type StdClass As Array

Finally got..!!!!

This the Route File...

Route::get('/welcome',function () {
    $phot = \App\Uploads::get();
    return view('site')->with('phot',$phot);
});

This is the view file...

<!doctype html>
<html lang="{{ app()->getLocale() }}">
    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1">

        <!-- Styles -->
        </style>

        <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
        <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
        <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>

    </head>
    <body>
        
            <div class="container">
                <h2>Carousel Example</h2>
                <div id="myCarousel" class="carousel slide" data-ride="carousel">
                    
                    <!-- Indicators -->
                  <ol class="carousel-indicators">
                    @for($i=0; $i<sizeof($phot); $i++)
                    <li data-target="#myCarousel" data-slide-to="0" class="@if ($i == 0) active @endif"></li>
                    @endfor
                  </ol>
                    
                  <!-- Wrapper for slides -->
                  <div class="carousel-inner" role="listbox">
                        @for($i=0; $i<sizeof($phot); $i++)
                        <div class="item @if ($i == 0) active @endif">
                            <img src="uploads/{{ $phot[$i]->original_filename }}" alt="Los Angeles" style="width:100%;">
                            <div class="carousel-caption">
                                <h3>{{ $phot[$i]->filename }}</h3>
                                <p>{{ $phot[$i]->filename }}</p>
                            </div>
                        </div>
                        @endfor                                
                   </div>
                 
                  <!-- Left and right controls -->
                  <a class="left carousel-control" href="#myCarousel" data-slide="prev">
                    <span class="glyphicon glyphicon-chevron-left"></span>
                    <span class="sr-only">Previous</span>
                  </a>
                  <a class="right carousel-control" href="#myCarousel" data-slide="next">
                    <span class="glyphicon glyphicon-chevron-right"></span>
                    <span class="sr-only">Next</span>
                  </a>
                  
                </div>
            </div>

        
    </body>
</html>

Thanks.....guys for your time..

Pirate left a reply on Cannot Use Object Of Type StdClass As Array

@vinodsharma

I have tried like this. Error is not showing. but no images.

This is in my controller.

public function slide() {
        $phot['uploads'] = DB::table('uploads')->select('*')->get();
       
        return view('site', compact ('phot'));
}

This is in my view.

<!-- Wrapper for slides -->
                  <div class="carousel-inner" role="listbox">
@for($i=1; $i<count($phot); $i++)
                    @if ($i == 1)
                        <div class="item active">
                    @else
                        <div class="item">
                    @endif  
                        <img src="uploads/{{ $phot[$i]->original_filename }}" alt="Los Angeles" style="width:100%;">
                      <div class="carousel-caption">
                        <h3>{{ $phot[$i]['filename'] }}</h3>
                        <p>{{ $phot[$i]['filename'] }}</p>
                      </div>
                    </div>
                    @endfor 
 </div>

Pirate started a new conversation Cannot Use Object Of Type StdClass As Array

I am trying to put a dynamic carousel in my project.

i want to get the variable $phot in an array format so i have used the 'compact function'.

I am facing the error.

"Cannot use object of type stdClass as array "

Controller

public function slide() {
        $phot = DB::table('uploads')->select('*')->get();
        
        return view('site', compact ('phot'));
 }

This is my site.blade.php

<!doctype html>
<html lang="{{ app()->getLocale() }}">
    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1">

        <title>Laravel</title>

        <!-- Fonts -->
        <link href="https://fonts.googleapis.com/css?family=Raleway:100,600" rel="stylesheet" type="text/css">

        <!-- Styles -->
        <style>
            html, body {
                background-color: #fff;
                color: #636b6f;
                font-family: 'Raleway', sans-serif;
                font-weight: 100;
                height: 100vh;
                margin: 0;
            }

            .full-height {
                height: 100vh;
            }

            .flex-center {
                align-items: center;
                display: flex;
                justify-content: center;
            }

            .position-ref {
                position: relative;
            }

            .top-right {
                position: absolute;
                right: 10px;
                top: 18px;
            }

            .content {
                text-align: center;
            }

            .title {
                font-size: 84px;
            }

            .links > a {
                color: #636b6f;
                padding: 0 25px;
                font-size: 12px;
                font-weight: 600;
                letter-spacing: .1rem;
                text-decoration: none;
                text-transform: uppercase;
            }

            .m-b-md {
                margin-bottom: 30px;
            }
        </style>
        
            <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">

    </head>
    <body>
        
            <div class="container">
                <h2>Carousel Example</h2>
                <div id="myCarousel" class="carousel slide" data-ride="carousel">
                  <!-- Indicators -->
                  <ol class="carousel-indicators">
                    <li data-target="#myCarousel" data-slide-to="0" class="active"></li>
                    <li data-target="#myCarousel" data-slide-to="1"></li>
                    <li data-target="#myCarousel" data-slide-to="2"></li>
                  </ol>

                  <!-- Wrapper for slides -->
                  <div class="carousel-inner" role="listbox">
                    @for($i=0; $i<count($phot); $i++)
                    @if ($i == 0)
                        <div class="item active">
                    @else
                        <div class="item">
                    @endif  
                        <img src="uploads/{{ $phot[$i]['original_filename'] }}" alt="Los Angeles" style="width:100%;">
                      <div class="carousel-caption">
                        <h3>{{ $phot[$i]['filename'] }}</h3>
                        <p>{{ $phot[$i]['filename'] }}</p>
                      </div>
                    </div>
                    @endfor
                  </div>

                  <!-- Left and right controls -->
                  <a class="left carousel-control" href="#myCarousel" data-slide="prev">
                    <span class="glyphicon glyphicon-chevron-left"></span>
                    <span class="sr-only">Previous</span>
                  </a>
                  <a class="right carousel-control" href="#myCarousel" data-slide="next">
                    <span class="glyphicon glyphicon-chevron-right"></span>
                    <span class="sr-only">Next</span>
                  </a>
                </div>
              </div>

        
    </body>
</html>
07 Dec
1 year ago

Pirate left a reply on (1/1) Swift_TransportException Connection Could Not Be Established With Host Smtp.gmail.com [php_network_getaddresses: Getaddrinfo Failed: Temporary Failure In Name Resolution #0]

@Shawdow

It has said in the laravel documentation

In your ".env" file

"For local development, you should set the APP_DEBUG environment variable to true. In your production environment, this value should always be false. If the value is set to true in production, you risk exposing sensitive configuration values to your application's end users."

So i recommend you to use the official documentation given by the laravel itself

17 Nov
1 year ago

Pirate left a reply on Laravel Remember Me Checkbox Not Working

@bestmomo

Thanks

Yeah, but in my laravel login system it is not working..

I also have tried with clearing cookies in Mozilla and Chrome browsers..

Pirate started a new conversation Laravel Remember Me Checkbox Not Working

I created simple builtin laravel login system and i have set database configuration and users details getting stored in database But when i login with remember me checkbox it is getting sucessfully login but the remember me checkbox not working in login.

What changes should i make to work??

Thanks