Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Good Sphere
Jun 16, 2018

My job wanted me to research and try out Laravel to experiment with real time web stuff between users, such as websockets using Symfony. Initially I wanted to use Ratchet, but then it was suggested I use Laravel since it is more widely used, and includes features that Ratchet has with Symfony, but it has turned into a complete mess.

I'm using an NGINX VPS with Ubuntu 18.04.4. Aside from it a disaster to install, I keep running into errors and other mishaps which is making it impossible for me to proceed.

Files inside the storage/framework/views folder keep having permission issues. The only way to fix it is to set the permissions on these manually. The folders that contain these have 775 permissions. I have no idea what Laravel is doing to set these incorrectly, and since it generates these files by itself, it keeps recreating this problem.

It seems that I cannot route with a subfolder name after the domain.

I edited web.php inside Laravel's routes folder:

code:
Route::get('/test', function() {
    return view('test', [
        'name' => request('name')
    ]);
});
When I visit http://www.mydomain.com/test?name=myName, I get a 404.

I have a test.blade.php, which looks like:

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

        <title>Test</title>

        <!-- Fonts -->
        <link href="https://fonts.googleapis.com/css?family=Nunito:200,600" rel="stylesheet">


    </head>
    <body>
        <h1>{{ $name }}</h1>
    </body>
</html>
I also tested it with "/", and it works, but I need to make it work with "/test".

I've been watching the Laracasts, and trying to continue without being able to use routing, even though it seems essential, but the videos are missing vital portions code from other files. There are many repeated things on the site pushing me to pay a subscription fee to join their forums and other features. It doesn't seem right.

On one hand I know you may hit some roadblocks along the way to learn something new like this, and on the other, I've barely written any code after a few weeks just trying to get this setup. I'd rather get up and running hassle-free learning websockets, instead of learning the entirety of Laravel while getting it working properly on this server.

So should I keep going, or move onto something better? Any ideas about the current issues I'm having with routing?

Adbot
ADBOT LOVES YOU

DELETE CASCADE
Oct 25, 2017

i haven't washed my penis since i jerked it to a phtotograph of george w. bush in 2003
well um let's see it's a php web framework, so i'm pretty sure if you were feeling good about it, that would indicate something is very wrong with you

Good Sphere
Jun 16, 2018

You’ve got a point there.

PHP is very flawed, but it’s something I’m used to, and know my way around. I just haven’t used too many frameworks, and nothing this large. Again, I’m baffled the support it has since it seems so broken. Maybe I have rare setup that makes it break so much though.

Good Sphere fucked around with this message at 06:37 on Apr 29, 2020

Balsa
May 10, 2020

Turbo Nerd
I suggest to start looking for projects that are already using Laravel and review their code and how they are using it. Its how I learned most of the other framework knowledge that I've picked up over the years. I suggest something like a CRUD app, like Beatsaver https://github.com/elliotttate/beatsaver-laravel

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply