File: resources/views/layouts/app.blade.php

Recommend this page to a friend!
  Classes of Ahmed Khan  >  PHP Realtime Chat with Laravel, Vue.js and Pusher  >  resources/views/layouts/app.blade.php  >  Download  
File: resources/views/layouts/app.blade.php
Role: Auxiliary script
Content type: text/plain
Description: Auxiliary script
Class: PHP Realtime Chat with Laravel, Vue.js and Pusher
Realtime chat application with an API and channels
Author: By
Last change:
Date: 2 months ago
Size: 4,283 bytes
 

Contents

Class file image Download
<!DOCTYPE html>
<html lang="{{ config('app.locale') }}">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <!-- CSRF Token -->
    <meta name="csrf-token" content="{{ csrf_token() }}">

    <title>{{ config('app.name', 'Laravel') }}</title>

    <!-- Styles -->
    <link href="{{ url('/css/app.css') }}" rel="stylesheet">
    <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
    @if(Auth::user())
    <link href="{{ url('/css/chat.css') }}" rel="stylesheet">
    <script>
        window.userid = {{Auth::user()->id}};
        window.username = "{{Auth::user()->name}}";
    </script>
    @endif
    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
    <!-- Scripts -->
    <script>
        window.Laravel = {!! json_encode([
            'csrfToken' => csrf_token(),
        ]) !!};
    </script>
</head>
<body>
    <div id="app">
        <nav class="navbar navbar-default navbar-static-top">
            <div class="container">
                <div class="navbar-header">

                    <!-- Collapsed Hamburger -->
                    <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#app-navbar-collapse">
                        <span class="sr-only">Toggle Navigation</span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                    </button>

                    <!-- Branding Image -->
                    <a class="navbar-brand" href="{{ url('/') }}">
                        {{ config('app.name', 'Laravel') }}
                    </a>
                </div>

                <div class="collapse navbar-collapse" id="app-navbar-collapse">
                    <!-- Left Side Of Navbar -->
                    <ul class="nav navbar-nav">
                        &nbsp;
                    </ul>

                    <!-- Right Side Of Navbar -->
                    <ul class="nav navbar-nav navbar-right">
                        <!-- Authentication Links -->
                        @if (Auth::guest())
                            <li><a href="{{ route('login') }}">Login</a></li>
                            <li><a href="{{ route('register') }}">Register</a></li>
                        @else
                            <li class="dropdown">
                                <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
                                    {{ Auth::user()->name }} <span class="caret"></span>
                                </a>
                            </li>
                            <li>
                                        <a href="{{ route('logout') }}"
                                            onclick="event.preventDefault();
                                                     document.getElementById('logout-form').submit();">
                                            Logout
                                        </a>

                                        <form id="logout-form" action="{{ route('logout') }}" method="POST" style="display: none;">
                                            {{ csrf_field() }}
                                        </form>
                                    </li>
                            @can('admin')
                                <!-- The Current User Can Update The Post -->
                                <li><a href="">Edit</a></li>
                            @elsecan('create')
                                <!-- The Current User Can Create New Post -->
                            @endcan
                        @endif
                    </ul>
                </div>
            </div>
        </nav>
        <div class="container-fluid">
                @yield('content')
        </div>
       
    </div>

    <!-- Scripts -->
    <script src="{{ url('/js/app.js') }}"></script>
</body>
</html>

For more information send a message to info at phpclasses dot org.