Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

dio7's avatar
Level 1

pull-right does not work in show.blade.php

anyone knows how to work pull-right in show.blade.php using laravel 5.6

0 likes
5 replies
Cronix's avatar

Do you mean pull-right bootstrap class?

<div class="container">
  <div class="row">
    <div class="col-md-12">
        <div class="pull-left">
            I'm on the left
        </div>
        <div class="pull-right">
            I'm on the right
        </div>
    </div>
  </div>  
</div>

example: https://jsfiddle.net/z57cgp6f/2/

dio7's avatar
Level 1

this is my show.blade.php @extends('layouts.app')

@section('content')

<div class="col-md-9 col-lg-9 col-sm-9 pull-left">
  <!-- The justified navigation menu is meant for single line per list item.
       Multiple lines will require custom code not provided by Bootstrap. -->
  <!-- Jumbotron -->
  <div class="jumbotron">
    <h1>{{ $project->name }}</h1>
    <p class="lead">{{ $project->description}}</p>
    <!--<p><a class="btn btn-lg btn-success" href="#" role="button">Get started today</a></p>-->
  </div>

  <!-- Example row of columns -->
  <div class="row col-md-12 col-lg-12 col-sm-12" style="background: white; margin: 10px; ">
    <a href="/projects/create" class="pull-left" >Add project</a>
  
    <div class="row container-fluid"> 
    <form method="post" action="{{ route('comments.store') }}">
                          {{ Csrf_field() }}

          <input type="hidden" name="commentable_type" value="Project">
           <input type="hidden" name="commentable_id" value="{{ $project->id }}">                    

                          <div class="form-group">
                          <label for="comment-content">Comment</label>
                            <textarea placeholder="Enter comments"
                                      style="resize: vertical;"
                                      id="comment-content"
                                      name="body"
                                      rows="3" spellcheck="false"
                                      class="form-control autosize-target text-left">
                                       
                                       </textarea>
                            
                          </div>

                          <div class="form-group">
                            <label for="comment-content">proof of work done(url/Photos)</label>
                              <textarea placeholder="Enter Url or screenshots"
                                        style="resize: vertical;"
                                        id="comment-content"
                                        name="url"
                                        rows="2" spellcheck="false"
                                        class="form-control autosize-target text-left">
                                         
                                         </textarea>
                            
                          </div>

                          <div class="form-group">
                              <input type="submit" class="btn btn-primary" value="Submit" />
                            
                          </div>

      </form>
      </div>






    {{--@foreach($project->projects as $project)
    <div class="col-lg-4 col-md-4 col-sm-4">
      <h2>{{ $project->name }}</h2>
      <p class="text-danger">{{ $project->description }}</p>
      <p><a class="btn btn-primary" href="/projects/{{ $project->id }}" role="button">View Porject »</a></p>
    </div>
    @endforeach--}}
  </div>
</div>
  <!-- Site footer -->
  <div class="col-sm-3 col-md-3 col-lg-3 pull-right">
      <!--<div class="sidebar-module sidebar-module-inset">
        <h4>About</h4>
        <p>Etiam porta <em>sem malesuada magna</em> mollis euismod. Cras mattis consectetur purus sit amet fermentum. Aenean lacinia bibendum nulla sed consectetur.</p>
      </div>-->
      <div class="sidebar-module"> 
        <h4>Action</h4>
        <ol class="list-unstyled">
          <li><a href="/projects/{{ $project->id }}/edit">Edit</a></li>
          <li><a href="/projects/create">create new projects</a></li>
          <li><a href="/projects">my project</a></li>
         
         <br/>

       @if($project->user_id == Auth::user()->id)
         <li>
            <a href="#"
                onclick="
                var result =  confirm('are you sure you want to delete this project?');
                    if(result){
                            event.preventDefault();
                            document.getElementById('delete-form').submit();
                    }
                    "  
                    >
                  Delete
                </a>

                <form id="delete-form" action="{{ route('projects.destroy',[$project->id]) }}"
                method="POST" style="display: none;">
                  <input type="hidden" name="_method" value="delete">
                  {{ csrf_field() }}
                </form>

            </li>
         @endif
          <!--<li><a href="#">Add new Member</a></li>-->
        </ol>
      </div>

      
      
    </div>
 
@endsection
Cronix's avatar
Cronix
Best Answer
Level 67

I updated my answer, and fiddle. Please compare it to your structure. The pull-left/pull-right should be in their own divs after the col. They both need to be in the same "container". Right now they're not constrained by anything.

Please or to participate in this conversation.