Steady-Entertainment

Steady-Entertainment

Creator at Offline

Member Since 1 Year Ago

World

Experience Points
47,500
Total
Experience

2,500 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
443
Lessons
Completed
Best Reply Awards
0
Best Reply
Awards
  • start your 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-in-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 Created with Sketch.

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • lifer Created with Sketch.

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • evangelist 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.

Level 10
47,500 XP
Jul
08
3 months ago
Activity icon

Started a new Conversation Vue2-leaflet Gray Map

Hello guys,

I asked this question already and tried to solve it on my own, but I am a bit lost at the moment.

I have an inline component:

<create-offer inline-template>

                            <div id="mapid"></div>

</create-offer>

my app lives inside an id=app div

<!DOCTYPE html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">

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

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

<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/leaflet.css"
  integrity="sha512-xwE/Az9zrjBIphAcBb3F6JVqxf46+CDLwfLMHloNu6KEQCAWi6HcDUbeOfBIptF7tcCzusKFjFw2yuvEpDL9wQ=="
  crossorigin=""/>


    <!-- Scripts -->
    <script>
        window.App = {!! json_encode(
            [
            'signedIn' => Auth::check(),
            'user' => Auth::user()
            ]) !!}
    </script>



    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/trix/1.2.1/trix.css">
    <!-- Fonts -->
    <link rel="dns-prefetch" href="//fonts.gstatic.com">
    <link href="https://fonts.googleapis.com/css?family=Nunito" rel="stylesheet">
    <link rel="shortcut icon" href="#" />

    <link rel="icon" href="/img/favicon.ico" type="image/x-icon"/>

    <!-- Styles -->
    <link href="/css/app.css" rel="stylesheet">

    <style>
        body {
            "padding-bottom: 100px;"
        }

        .level {
            display: flex;
            align-items: center;
        }

        .level-item {
            margin-right: 1em;
        }

        .flex {
            flex: 1;
        }

        [v-cloak] { display: none; }

        .ais-highlight > em { background: yellow; font-style: normal; }

        #logo {
            position: fixed;
            width: 40%;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
        }

        #mapid { height: 380px; }

        .my-leaflet-map-container img {
            max-height: none;
        }

    </style>

    @yield('header')

</head>
    <body class="bg-white">



    <div id="app">

                @auth()
                    @include('layouts/nav')
                @endauth

                        @yield('content')

                @auth()
                    @include('layouts/footer')
                @endauth

            <flash message="{{ session('flash') }}"></flash>

        </div>

    <script src="https://unpkg.com/[email protected]/dist/leaflet.js"
            integrity="sha512-gZwIG9x3wUXg2hdXF6+rVkLF/0Vi9U8D2Ntg4Ga5I5BZpVkVxlJWbSQtXPSiUTtC0TjtGOmxa1AJPuV0CPthew=="
            crossorigin=""></script>

    <script src="/js/app.js">
    </script>
    </body>
</html>

my Vue component for the inline template looks like this:

	<script>

import L from 'leaflet';
import { LMap, LTileLayer, LMarker } from 'vue2-leaflet';

export default {
  name: 'MyAwesomeMap',
  data: function () {
      return {
          zoom:13,
          center: L.latLng(47.413220, -1.219482),
          url:'http://{s}.tile.osm.org/{z}/{x}/{y}.png',
          attribution:'&copy; <a href="http://osm.org/copyright">OpenStreetMap</a> contributors',
          marker: L.latLng(47.413220, -1.219482),
      }
  },
  components: {
    LMap,
    LTileLayer,
    LMarker,
  },
};
</script>

in my app.js I have registered my component globally:

Vue.component('create-offer', require('./components/CreateOffer.vue').default);

NOW when I display my app the map just shows a gray map.

But as soon as I put the map outside the id=app div it gets rendered without any problems.

Do you guys have any idea what this is?

<!DOCTYPE html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">

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

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

<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/leaflet.css"
  integrity="sha512-xwE/Az9zrjBIphAcBb3F6JVqxf46+CDLwfLMHloNu6KEQCAWi6HcDUbeOfBIptF7tcCzusKFjFw2yuvEpDL9wQ=="
  crossorigin=""/>


    <!-- Scripts -->
    <script>
        window.App = {!! json_encode(
            [
            'signedIn' => Auth::check(),
            'user' => Auth::user()
            ]) !!}
    </script>



    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/trix/1.2.1/trix.css">
    <!-- Fonts -->
    <link rel="dns-prefetch" href="//fonts.gstatic.com">
    <link href="https://fonts.googleapis.com/css?family=Nunito" rel="stylesheet">
    <link rel="shortcut icon" href="#" />

    <link rel="icon" href="/img/favicon.ico" type="image/x-icon"/>

    <!-- Styles -->
    <link href="/css/app.css" rel="stylesheet">

    <style>
        body {
            "padding-bottom: 100px;"
        }

        .level {
            display: flex;
            align-items: center;
        }

        .level-item {
            margin-right: 1em;
        }

        .flex {
            flex: 1;
        }

        [v-cloak] { display: none; }

        .ais-highlight > em { background: yellow; font-style: normal; }

        #logo {
            position: fixed;
            width: 40%;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
        }

        #mapid { height: 380px; }

        .my-leaflet-map-container img {
            max-height: none;
        }

    </style>

    @yield('header')

</head>
    <body class="bg-white">

<div id="mapid"></div>            <------------------------------------

    <div id="app">

                @auth()
                    @include('layouts/nav')
                @endauth

                        @yield('content')

                @auth()
                    @include('layouts/footer')
                @endauth

            <flash message="{{ session('flash') }}"></flash>

        </div>

    <script src="https://unpkg.com/[email protected]/dist/leaflet.js"
            integrity="sha512-gZwIG9x3wUXg2hdXF6+rVkLF/0Vi9U8D2Ntg4Ga5I5BZpVkVxlJWbSQtXPSiUTtC0TjtGOmxa1AJPuV0CPthew=="
            crossorigin=""></script>

    <script src="/js/app.js">
    </script>
    </body>
</html>

Jun
26
3 months ago
Activity icon

Started a new Conversation Leaflet / <div Id="mapid"> </div> <div Id="app">

Hello community,

I want to display my leaflet map.

    <div id="mapid"></div>

    <div id="app">
	...
    </div>

this works.

    <div id="app">

    <div id="mapid"></div>

    </div>

this doesn't work. (shows a grey map)

What could be the reason?

How do I allow my leaflet map to live inside my app div

Jun
24
3 months ago
Activity icon

Started a new Conversation Leaflet Gray Map

Hey guys,

my leaflet maps just shows just a gray map

if i remove the css style sheet it shows the tiles but in an unordered list randomly across the screen

    <link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/leaflet.css"
       integrity="sha512-xwE/Az9zrjBIphAcBb3F6JVqxf46+CDLwfLMHloNu6KEQCAWi6HcDUbeOfBIptF7tcCzusKFjFw2yuvEpDL9wQ=="
       crossorigin=""/>

    <script src="https://unpkg.com/[email protected]/dist/leaflet.js"
       integrity="sha512-gZwIG9x3wUXg2hdXF6+rVkLF/0Vi9U8D2Ntg4Ga5I5BZpVkVxlJWbSQtXPSiUTtC0TjtGOmxa1AJPuV0CPthew=="
       crossorigin=""></script>
<style>
	#mapid { height: 680px; }
</style>
@extends('layouts.app')

@section('content')
    <create-offer inline-template>

        <div id="mapid"></div>

   
        <script>
            var mymap = L.map('mapid').setView([51.505, -0.09], 13);
            L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
                attribution: 'Map data &copy; <a href="https://www.openstreetmap.org/">OpenStreetMap</a> contributors, <a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, Imagery © <a href="https://www.mapbox.com/">Mapbox</a>',
            }).addTo(mymap);
        </script>
    </create-offer>
Jun
06
4 months ago
Activity icon

Replied to Php Artisan Migrate ERROR

I NEED HELP :D !!!!!!!

Activity icon

Replied to Php Artisan Migrate ERROR

https://stackoverflow.com/questions/37239970/connect-to-mysql-server-without-sudo#37241990

I followed this and created a new user still no success

I created a new blank laravel app and deinstalled mysql and maria db and reinstalled fresh ...

still no success

Activity icon

Replied to Php Artisan Migrate ERROR

it seems the server is running on reniars mac book pro and not on localhost is that possible?

Activity icon

Replied to Php Artisan Migrate ERROR

When I use

/usr/local/bin/mysql.server restart

I get

Shutting down MySQL
.. ERROR! The server quit without updating PID file (/usr/local/var/mysql/reniars-MacBook-Pro.local.pid).
 ERROR! Failed to stop running server, so refusing to try to start.
Activity icon

Replied to Php Artisan Migrate ERROR

I dont know why there is mariaDB listed as a server version.

Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 35

Server version: 5.5.5-10.4.13-MariaDB Homebrew

Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

Activity icon

Replied to Php Artisan Migrate ERROR

I tried ...

brew services restart mysql
==> Successfully started `mysql` (label: homebrew.mxcl.mysql)

but same results

Activity icon

Replied to Php Artisan Migrate ERROR

yes I did

Activity icon

Started a new Conversation Php Artisan Migrate ERROR

I am setting up a new macbook pro

php artisan migrate

returns the following ERROR

Illuminate\Database\QueryException

  SQLSTATE[HY000] [1698] Access denied for user 'root'@'localhost' (SQL: select * from information_schema.tables where table_schema =  and table_name = migrations and table_type = 'BASE TABLE')

strange thing is that this command doesn't work

mysql -uroot -p

instead I have to use

sudo mysql -uroot -p

or just

mysql

once I am logged into mysql I create a database named "pool"

my .env looks like this

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=pool
DB_USERNAME=root
DB_PASSWORD=

I found a lot of threads regarding this topic:

php artisan config:clear
php artisan cache:clear
php artisan config:cache

didn't help

I had maria DB installed

brew install maraiadb

and then i de installed it

now when I do

brew search mysql

I have mysql and [email protected] installed

these are my sql users

mysql> SELECT user, host FROM mysql.user;
+-------------+---------------------------+
| User        | Host                      |
+-------------+---------------------------+
|             | localhost                 |
| mariadb.sys | localhost                 |
| reniar      | localhost                 |
| root        | localhost                 |
|             | reniars-macbook-pro.local |
+-------------+---------------------------+
5 rows in set (0.00 sec)
Apr
24
5 months ago
Activity icon

Awarded Best Reply on Cannot Access Avatars On Production Environmet

SOLVED:

First you have to understand the fundamentals:

Your webserver isn't aware about the root of Linux "/"

Your webserver sees /yourApplicationDirectory/ as the root directory

The client expects the file to be stored in /public or in my case /public/avatars

But the saved file is stored under /storage/app/public/ or in my case /storage/app/public/avatars

Solution to fix it is navigate to the /public/ directory and create a symbolic link (symlinc)

ln -s ../storage/app/public/avatar avatars

In the first part of the symlink you navigate to the place where to find it

In the second part of the symlink you give it a name

I hope this helps some one

Activity icon

Replied to Cannot Access Avatars On Production Environmet

SOLVED:

First you have to understand the fundamentals:

Your webserver isn't aware about the root of Linux "/"

Your webserver sees /yourApplicationDirectory/ as the root directory

The client expects the file to be stored in /public or in my case /public/avatars

But the saved file is stored under /storage/app/public/ or in my case /storage/app/public/avatars

Solution to fix it is navigate to the /public/ directory and create a symbolic link (symlinc)

ln -s ../storage/app/public/avatar avatars

In the first part of the symlink you navigate to the place where to find it

In the second part of the symlink you give it a name

I hope this helps some one

Activity icon

Replied to Cannot Access Avatars On Production Environmet

   data() {
            return {
                avatar: this.user.avatar_path
            };
        },
Activity icon

Replied to Cannot Access Avatars On Production Environmet

I thought so ... but I am using vue -.-

Activity icon

Replied to Cannot Access Avatars On Production Environmet

Where do you implement this?

{{ asset("storage/{$banner->image->path}") }}

on the controller in the config file or in the mutator?

my controller looks like this atm ...


    public function store()
    {
        request()->validate([
            'avatar' => ['required', 'image']
        ]);

        auth()->user()->update([
            'avatar_path' => request()->file('avatar')->store('avatars', 'public')
        ]);

        return response([], 204);
    }
Activity icon

Started a new Conversation Cannot Access Avatars On Production Environmet

Hello community,

When I run my Laravel app in dev environment. All my avatars which are saved under

/storage/app/public/avatars

are displayed correctly

I created the symlink by

php artisan storage:link

and it correctly points to

/public/storage/avatars

However if I migrate to production with laravel forge I am getting a 404 for the avatars.

When I go to my database and change the avatar_path from

/avatar/foor.png

to

/storage/avatar/png.

it works ....

any idea what could have gone wrong during the forge migration process?

I already checked other forum posts like :

https://laracasts.com/discuss/channels/laravel/laravel-storage-goes-to-404-page

Apr
23
5 months ago
Activity icon

Replied to 500 Not Found Error

THANK you Snapey and wingley for your time I honestly really appreciate your help!!!!!!

MUCH LOVE

You are what keeps the open source community growing and chaning the world

Activity icon

Replied to 500 Not Found Error

SOLVED

in my deployment script I had

cd /home/forge/offline.vision
git pull origin master
composer install --no-interaction --prefer-dist --optimize-autoloader

( flock -w 10 9 || exit 1
    echo 'Restarting FPM...'; sudo -S service php7.4-fpm reload ) 9>/tmp/fpmlock

if [ -f artisan ]; then
    php artisan migrate --force
fi

npm install
npm run dev

php artisan cache:clear
php artisan route:clear
php artisan config:cache
composer dumpautoload

php artisan scout:flush "App\Thread"
php artisan scout:import "App\Thread"

but it needed to be

composer dump-autoload
Activity icon

Replied to 500 Not Found Error

when I visit

http://offline.vision/api/channels

I get ....

Illuminate\Contracts\Container\BindingResolutionException
Target class [App\Http\Controllers\api\ChannelsController] does not exist.
http://offline.vision/api/channels 

But when i visit

offline.test/api/channels

I get ....

https://pasteboard.co/J59MJNo.png

it makes no sense to me :(

i just uploaded the repo to git hub and then back to my webserver (VPS)

Activity icon

Replied to 500 Not Found Error

the

/api/

it gets from the

axios.get('/api/channels')

Activity icon

Replied to 500 Not Found Error

its the last step expect the SSL certificate that blows up before my application runs

Activity icon

Replied to 500 Not Found Error

Hey Snapey,

This is the path to my controller

Offline/app/Http/Controllers/Api/ChannelsController.php/
my API routes are here

Route::delete('/profiles/{user}/notifications/{notification}', '[email protected]');

//---------------API section------------------

Route::get('/api/users', '[email protected]');

Route::post('/api/users/{user}/avatar', 'Api\[email protected]')->middleware('auth')->name('avatar');

Route::get('/api/channels', 'Api\[email protected]');

//---------------End-API section--------------

Route::post('/replies/{reply}/best', '[email protected]')->name('best-replies.store');
Activity icon

Started a new Conversation 500 Not Found Error

Hello friends,

I am getting this ERROR:

Target class [App\Http\Controllers\api\ChannelsController] does not exist./home/forge/offline.vision/vendor/laravel/framework/src/Illuminate/Container/Container.php#807Illuminate\Contracts\Container\BindingResolutionException

Class App\Http\Controllers\api\ChannelsController does not exist/home/forge/offline.vision/vendor/laravel/framework/src/Illuminate/Container/Container.php#805ReflectionException
my Vue component looks like this:


        created() {
            axios.get('/api/channels').then(({ data }) => (this.channels = data));
        },
<?php

namespace App\Http\Controllers\Api;

use App\Channel;
use App\Http\Controllers\Controller;
use Illuminate\Support\Facades\Cache;

class ChannelsController extends Controller
{
    /**
     * Fetch all channels.
     */
    public function index()
    {
        return Cache::rememberForever('channels', function () {
            return Channel::where('archived', false)->orderBy('name', 'asc')->get();
        });
    }
}

what really drives me crazy is: that it works flawlessly in my dev env and in production on the webserver I kkep getting this

the effect is that my channels are not displyed ... see screen shot

https://pasteboard.co/J59hj9j.png

Apr
22
5 months ago
Activity icon

Replied to Call To Undefined Function App\Http\Controllers\Auth\user()

yes I am programming for too long today sorry that solved it ... I am stupid

Activity icon

Started a new Conversation Call To Undefined Function App\Http\Controllers\Auth\user()

Hello guys I am getting the following bug

https://pasteboard.co/J50GYvo.png

i checked tha has verified email and isAdmin function both exist on the model

return $request->user()->hasVerifiedEmail() || user()->isAdmin()
Activity icon

Replied to Larvel Route() Point To IP

I am not 100% sure but it seems to be working ... I dont understand why but that seems to do the trick

THANKS

Activity icon

Replied to Larvel Route() Point To IP

is there a place in the firewall or in the php.ini or on the webserver where I can change it?

Activity icon

Replied to Larvel Route() Point To IP

still doesn't work

Activity icon

Replied to Larvel Route() Point To IP

Yes I checked the link but I am not using a loadbalancer yet and I allowed all proxies now:

class TrustProxies extends Middleware
{
    protected $proxies = '*';
    /**
     * The trusted proxies for this application.
     *
     * @var array|string
     */
    /**
     * The headers that should be used to detect proxies.
     *
     * @var int
     */
    protected $headers = Request::HEADER_X_FORWARDED_ALL;
}
Activity icon

Replied to Larvel Route() Point To IP

on

offline.vision

you get the following output

 array:36 [▼
  "USER" => "forge"
  "HOME" => "/home/forge"
  "HTTP_CONNECTION" => "Keep-Alive"
  "HTTP_X_FORWARDED_SERVER" => "offline.vision"
  "HTTP_X_FORWARDED_HOST" => "offline.vision"
  "HTTP_X_FORWARDED_FOR" => "62.202.183.94"
  "HTTP_X_FORWARDED_PROTO" => "http"
  "HTTP_UPGRADE_INSECURE_REQUESTS" => "1"
  "HTTP_COOKIE" => "vsid=919vr3303037803930342; bfp_sn_rf_b10ce94cf299b167b74a6944e0aec9d4=Direct/External; bfp_sn_rt_b10ce94cf299b167b74a6944e0aec9d4=1587118183894; bafp=8f61a370- ▶"
  "HTTP_ACCEPT_ENCODING" => "gzip, deflate"
  "HTTP_ACCEPT_LANGUAGE" => "en-US,en;q=0.5"
  "HTTP_ACCEPT" => "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8"
  "HTTP_USER_AGENT" => "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:76.0) Gecko/20100101 Firefox/76.0"
  "HTTP_HOST" => "192.168.1.220"
  "REDIRECT_STATUS" => "200"
  "SERVER_NAME" => "offline.vision"
  "SERVER_PORT" => "80"
  "SERVER_ADDR" => "192.168.1.220"
  "REMOTE_PORT" => "59530"
  "REMOTE_ADDR" => "192.168.1.1"
  "SERVER_SOFTWARE" => "nginx/1.17.3"
  "GATEWAY_INTERFACE" => "CGI/1.1"
  "SERVER_PROTOCOL" => "HTTP/1.1"
  "DOCUMENT_ROOT" => "/home/forge/offline.vision/public"
  "DOCUMENT_URI" => "/index.php"
  "REQUEST_URI" => "/"
  "SCRIPT_NAME" => "/index.php"
  "SCRIPT_FILENAME" => "/home/forge/offline.vision/public/index.php"
  "CONTENT_LENGTH" => ""
  "CONTENT_TYPE" => ""
  "REQUEST_METHOD" => "GET"
  "QUERY_STRING" => ""
  "FCGI_ROLE" => "RESPONDER"
  "PHP_SELF" => "/index.php"
  "REQUEST_TIME_FLOAT" => 1587566072.0716
  "REQUEST_TIME" => 1587566072
]

conclusion: You were totally right Snapey.

Do you also know how to solve this?

It is a bug that is virusing itself to through my entire application

Activity icon

Replied to Larvel Route() Point To IP

from app('url')

but APP_URL is: offline.vision

Activity icon

Replied to Larvel Route() Point To IP

Let me rephrase my question really simple:

Where does route() get the url / ip from?

function route($name, $parameters = [], $absolute = true)
    {
        return app('url')->route($name, $parameters, $absolute);
    }

And how can I change it?

Activity icon

Replied to Larvel Route() Point To IP

I am not behind a proxy but I am using port forwarding on my firewall

translating incoming requests to go from 62.2.92.66 which is my public ip to use NAT to go to 192.168.1.220

Activity icon

Replied to Larvel Route() Point To IP

the ip 192.168.1.220 is from my webserver

the address is offline.vision

Activity icon

Replied to Larvel Route() Point To IP

When I change

<form id="logout-form" action="{{ route('logout') }}" method="POST"

to

<form id="logout-form" action="/logout'" method="POST"

it works

but there are locations where i dont know how to replace the route function like:

<form id="logout-form" action="{{ route('logout') }}" method="POST"
Activity icon

Replied to Larvel Route() Point To IP

I am running the following script

cd /home/forge/offline.vision
git pull origin master
composer install --no-interaction --prefer-dist --optimize-autoloader

( flock -w 10 9 || exit 1
    echo 'Restarting FPM...'; sudo -S service php7.4-fpm reload ) 9>/tmp/fpmlock

if [ -f artisan ]; then
    php artisan migrate --force
fi

npm install
npm run dev

php artisan config:cache

php artisan cache:clear
php artisan view:clear

php artisan route:cache
Activity icon

Started a new Conversation Larvel Route() Point To IP

Hello community,

When I use Laravels route() funciton and it returns

192.168.1.220/register

instead of

myDomain/register

so my application doesnt work on the internet

if I change my.env file

to

APP_URL=mydomain.com

it doenst change

Activity icon

Replied to 192.168.1.22 Private Address Displayed After Deployment

offline.vision is the domain

Activity icon

Started a new Conversation 192.168.1.22 Private Address Displayed After Deployment

Hello frineds,

I deployed my application on a private server with a public IP address

when I click on register

I am always beeing redirected to 192.168.1.22/register insted of myDomain.com/register

therefore my application blows up on the internet

but in my private network it works perfectly

Activity icon

Started a new Conversation SSL Cerrtificate Failed Installation Forge

Hello freinds,

My appplication is deployed on a forge server and runs perfectly under http

When I am trying to install a SSL cert via forge I get the following output

--2020-04-22 07:27:44--  https://forge-certificates.laravel.com/le/778224/1017796?env=production
Resolving forge-certificates.laravel.com (forge-certificates.laravel.com)... 104.26.12.100, 104.26.13.100, 2606:4700:20::681a:d64, ...
Connecting to forge-certificates.laravel.com (forge-certificates.laravel.com)|104.26.12.100|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: ‘letsencrypt_script1587540464’

     0K ..                                                     59.3M=0s

2020-04-22 07:27:44 (59.3 MB/s) - ‘letsencrypt_script1587540464’ saved [2267]

Cloning into 'letsencrypt1587540464'...
Can't load /root/.rnd into RNG
140467621254272:error:2406F079:random number generator:RAND_load_file:Cannot open file:../crypto/rand/randfile.c:98:Filename=/root/.rnd
ERROR: Challenge is invalid! (returned: invalid) (result: {
  "type": "http-01",
  "status": "invalid",
  "error": {
    "type": "urn:ietf:params:acme:error:unauthorized",
    "detail": "Invalid response from http://www.offline.vision/.well-known/acme-challenge/t-JZvQtjusRpn0DwOUbsYQn1P7iapSwmiuznIBLuSms [62.2.92.66]: \"\u003c!DOCTYPE HTML PUBLIC \\"-//IETF//DTD HTML 2.0//EN\\"\u003e\n\u003chtml\u003e\u003chead\u003e\n\u003ctitle\u003e403 Forbidden\u003c/title\u003e\n\u003c/head\u003e\u003cbody\u003e\n\u003ch1\u003eForbidden\u003c/h1\u003e\n\u003cp\"",
    "status": 403
  },
  "url": "https://acme-v02.api.letsencrypt.org/acme/chall-v3/4108807015/RmxfQQ",
  "token": "t-JZvQtjusRpn0DwOUbsYQn1P7iapSwmiuznIBLuSms",
  "validationRecord": [
    {
      "url": "http://www.offline.vision/.well-known/acme-challenge/t-JZvQtjusRpn0DwOUbsYQn1P7iapSwmiuznIBLuSms",
      "hostname": "www.offline.vision",
      "port": "80",
      "addressesResolved": [
        "62.2.92.66"
      ],
      "addressUsed": "62.2.92.66"
    }
  ]
})

Any ideas are appreaciated.

Side note: My port 443 is not opened yet but that shouldnt play a role

Activity icon

Started a new Conversation Cannot Access Staging Server

Dear community and developers and programmers and nerds,

I am running a custom server with a nginx webserver managed by forge.

On this Server I have two sites.

Staging.offline.vision

and

Offline.vision
when I access Offline.vision => easy no problem
when I access staging.offline.vision => 403 Forbidden You don't have permission to access this resource

I followed this series exactly

https://laracasts.com/series/build-and-configure-a-staging-server

the result you can visit the domain

http://staging.offline.vision/
Apr
21
5 months ago
Activity icon

Started a new Conversation Nginx / Forge / 404

Hello community,

I installed my webserver via laravel forge on a custom VPS.

Before deployment it shows the php info correctly

Now after I deploy I get

nginx 404

this is my script:

cd /home/forge/offline.vision
git pull origin master
composer install --no-interaction --prefer-dist --optimize-autoloader

( flock -w 10 9 || exit 1
    echo 'Restarting FPM...'; sudo -S service php7.4-fpm reload ) 9>/tmp/fpmlock

if [ -f artisan ]; then
    php artisan migrate --force
fi

npm install
npm run dev

this is my domain

offline.vision

This is my .ENV

APP_NAME=Offline
APP_ENV=local
APP_KEY=base64:iXq3hk/PktcasdfdasffggasdfggafgagfgggTqNI=
APP_DEBUG=true
APP_URL=https://offline.test

LOG_CHANNEL=stack

DB_CONNECTION=mysql
DB_HOST=localhost
DB_PORT=3306
DB_DATABASE=forge
DB_USERNAME=forge
DB_PASSWORD="lolGqI9WblablablabqafWvuoUxx"

BROADCAST_DRIVER=log
CACHE_DRIVER=file
QUEUE_CONNECTION=sync
SESSION_DRIVER=file
SESSION_LIFETIME=120
QUEUE_DRIVER=sync

REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379

#MAIL_DRIVER=smtp
MAIL_DRIVER=log
MAIL_HOST=smtp.mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=
MAIL_PASSWORD=
[email protected]
MAIL_FROM_NAME=Example
MAIL_ENCRYPTION=TLS

AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
AWS_DEFAULT_REGION=us-east-1
AWS_BUCKET=

PUSHER_APP_ID=
PUSHER_APP_KEY=
PUSHER_APP_SECRET=
PUSHER_APP_CLUSTER=mt1

MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"

TELESCOPE_ENABLED=false


SCOUT_DRIVER=null
SCOUT_QUEUE=true

ALGOLIA_APP_ID=
ALGOLIA_KEY=
ALGOLIA_SECRET=
Apr
19
6 months ago
Activity icon

Started a new Conversation Nginx 404

Hello community,

I installed my webserver via laravel forge on a custom VPS.

2 days ago it was working perfectly

But then I had to delete the server and set it up again.

Before deployment it shows the php info correctly

Now after I deploy I get

nginx 404

this is my script:

cd /home/forge/offline.vision
git pull origin master
composer install --no-interaction --prefer-dist --optimize-autoloader

( flock -w 10 9 || exit 1
    echo 'Restarting FPM...'; sudo -S service php7.4-fpm reload ) 9>/tmp/fpmlock

if [ -f artisan ]; then
    php artisan migrate --force
fi

npm install
npm run dev

this is my domain

offline.vision

This is my .ENV

APP_NAME=Offline
APP_ENV=local
APP_KEY=base64:iXq3hk/PktcMLfKblabalbalbla3V/lmMURYfTqNI=
APP_DEBUG=true
APP_URL=https://offline.test

LOG_CHANNEL=stack

DB_CONNECTION=mysql
DB_HOST=localhost
DB_PORT=3306
DB_DATABASE=forge
DB_USERNAME=forge
DB_PASSWORD="lolGqI9WblablablabqafWvuoUxx"

BROADCAST_DRIVER=log
CACHE_DRIVER=file
QUEUE_CONNECTION=sync
SESSION_DRIVER=file
SESSION_LIFETIME=120
QUEUE_DRIVER=sync

REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379

#MAIL_DRIVER=smtp
MAIL_DRIVER=log
MAIL_HOST=smtp.mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=
MAIL_PASSWORD=
[email protected]
MAIL_FROM_NAME=Example
MAIL_ENCRYPTION=TLS

AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
AWS_DEFAULT_REGION=us-east-1
AWS_BUCKET=

PUSHER_APP_ID=
PUSHER_APP_KEY=
PUSHER_APP_SECRET=
PUSHER_APP_CLUSTER=mt1

MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"

TELESCOPE_ENABLED=false


SCOUT_DRIVER=null
SCOUT_QUEUE=true

ALGOLIA_APP_ID=
ALGOLIA_KEY=
ALGOLIA_SECRET=
Activity icon

Replied to My Webserver Responds A Private IP To The Internet

Dude bobby I really appreciate your help.

This is exactly what I was looking for.

I was so desprate since I was looking for a solution since 2 days.

I went to the laracast community and I saw your profile as the number one expert in this community.

I thought I have to travel to holland and meet you so you can help me and know as if you were reading my mind you replied and helped me.

I love you for connecting and helping me honestly.

BIG THANKS and much love very very appreciated!!!!!!!!!!!!!!!!!!!

Activity icon

Started a new Conversation My Webserver Responds A Private IP To The Internet

Hello my favourite community,

I have my own webserver inside my home network behind a UTC (hardware firewall).

When I open the server under 192.168.x.x the laravel app gets displayed perfectly.

As soon as I try to access my Laravel App from the outside world via NAT / portforwarding

I cannot see the css and js files.

The console showing me:

Failed to load resource: net::ERR_CONNECTION_TIMED_OUT app.css:1 Failed to load resource: net::ERR_CONNECTION_TIMED_OUT app.js:1 Failed to load resource: net::ERR_CONNECTION_TIMED_OUT 192.168.1.220/img/favicon.ico:1

please check for yourself

the domain is

http://offline.vision alternatively

https://prnt.sc/s28hvm Yes I am still having issues with SSL which cannot be installed.

I think this has to do with some file pointing to 192.168.1.220 instead of the domain.

I wonder where I can change these setting.

Activity icon

Started a new Conversation Public Css And Js Files Are Not Loaded From Webserver

Hello my favourite community,

I have my own webserver inside my home network behind a UTC (hardware firewall).

When I open the server under 192.168.x.x the laravel app gets displayed perfectly.

As soon as I try to access my Laravel App from the outside world via NAT / portforwarding

I cannot see the css and js files.

The console showing me:

Failed to load resource: net::ERR_CONNECTION_TIMED_OUT                   app.css:1
Failed to load resource: net::ERR_CONNECTION_TIMED_OUT                   app.js:1
Failed to load resource: net::ERR_CONNECTION_TIMED_OUT                   192.168.1.220/img/favicon.ico:1

please check for yourself

the domain is

http://offline.vision

alternatively

https://prnt.sc/s28hvm

Yes I am still having issues with SSL which cannot be installed.

I think this has to do with some file pointing to 192.168.1.220 instead of the domain.

I wonder where I can change these setting.