amidknight

amidknight

Member Since 4 Years Ago

Experience Points
9,330
Total
Experience

670 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
87
Lessons
Completed
Best Reply Awards
0
Best Reply
Awards
  • start-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-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-token Created with Sketch.

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • lifer-token Created with Sketch.

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • lara-evanghelist 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 2
9,330 XP
Sep
15
1 month ago
Activity icon

Replied to Laravel 6 (upgrade From 5.8) Failing To Find Route And 404 Page

Ran an experiment by taking out the other sites (domain route group).

Worked like a charm. Unfortunately, I would really like to avoid having to install Larvel 4 times; so, not sure what I'm doing wrong here.

Here's the domain route for each site - only difference being the env reference:

Route::domain(env('DOMAIN_PRO'))->group(function () {

Decided to see what would happen if I took and combined all the domain routes into one provider. That seemed to work, but it kind of makes me concerned about having routes in multiple service providers.

Thoughts??

Activity icon

Replied to Laravel 6 (upgrade From 5.8) Failing To Find Route And 404 Page

@bobbybouwmann: Thanks! Tried. Didn't work.

Even cleared the composer cache and deleted the composer.lock.

Activity icon

Started a new conversation Laravel 6 (upgrade From 5.8) Failing To Find Route And 404 Page

I'm getting ready to delve into deeper pages for my site. Created route group (practitioners). Created home page URL (get). Created profile page route (get). Went from link on homepage to profile page, the following happened.

(Can't upload images, sorry.)

Anybody seen something like this before??

Mar
20
6 months ago
Activity icon

Replied to Laravel 5.8 Testing W/ Database Must Run One At A Time

Good question. Just to make sure, the tests above are samples, not actuals - just don't want to get bogged down in specific implementations unless it is literally the problem, which I don't think it is...?? Also, this is Laravel 5.8.

Anyhow.

I have a real test file with three tests requiring DB connections: tests/Unit/PersonaTest.php - it uses the RefreshDatabase trait.

When all three tests are run:

  1. Fails because it's the one I'm currently working on.
  2. Timeout.
  3. Timeout.

When run individually:

  1. Fails (error) - undefined method
  2. Fails (no error) - retrieving username, which is blank
  3. Fails (error) - undefined method

tests/Unit/UserTest.php - has 3 tests as well.

  1. Passes.
  2. Timeout.
  3. Timeout.

When run individually:

  1. Passes.
  2. Passes.
  3. Passes.

tests/Unit/InvitationTest.php - has 6 tests, none require DB connection.

  1. Passes.
  2. Passes.
  3. Passes.
  4. Passes.
  5. Passes.
  6. Passes.

When run individually - all pass

tests/Unit/CharonTest.php - has 7 tests, none require DB connection.

All pass.

When run individually - all pass.

This is why I'm thinking it's directly tied to the DB connection concept. Let's try a suite that only has one test that requires a DB connection, to be thorough.

I will comment out all but one from tests/Unit/UserTest.php.

  1. Passes.

When run individually - passes.

I've actually created a phpunit group to exclude those tests when I run just phpunit. Of course, this causes problems when I actually do break something, hence why I'm asking for help.

From what I'm seeing online, it has to do with speed and asynchronous behavior.

Like a test is trying to build the DB while the previous one is still tearing it down or something. Hence the recommendations for in-memory and sqlite. I've also read about differences between sqlite and mysql that make me want to be as close to production as possible. I've also read about increasing the timeout in general...none of this last bit has been tested or verified by me.

I'm hoping for a solution and not a workaround that becomes the solution. This may be something that I'm causing or it may be a defect that hasn't been captured because many of us accept workarounds when we find them. All I know is I don't know what's going on and it might be close enough to the metal that it's beyond my depth. (I work from the human to the metal, not the other way around.)

Anyway, confused and curious.

Mar
18
6 months ago
Activity icon

Started a new conversation Laravel 5.8 Testing W/ Database Must Run One At A Time

Odd behavior that could be coming from the not doing it correctly place. I'm also not sure what all information would help keep this succinct yet cover the issue - updates will be added ass necessary.

Consider a vanilla Laravel install.

// UserTest.php

class UserTest extends TestCase
{
    use RefreshDatabase;

    public function testOne()
    {
        $user = User::make(['email' => '[email protected]']);
        $user->save();
        $this->assertTrue($user->id == 1);
    }

    public function testTwo()
    {
        $user = User::make(['email' => '[email protected]']);
        $user->save();
        $this->assertTrue($user->id == 1);
    }
}

Running the tests one at a time, they both pass (phpunit --filter=testOne and phpunit --filter=testTwo). Run them sequentially, all but the first will error out with a timeout error (phpunit).

What's going on (I'd really like to understand the why)? And what's the fix?

What I've tried:

  1. Use in-memory SQLite.
  2. Use DatabaseTransactions instead of DatabaseRefresh

Would like to be as close to production-like as possible.

Mar
09
7 months ago
Activity icon

Started a new conversation Laravel Dusk Test Cases In Different Sub-Dir Than Browser

Does this just fall under the "you're doing it wrong" category?

I'm trying to setup browser testing and would like to put the test classes into a different folder than ./tests/Browser. Seems like Laravel doesn't find them or doesn't try to run them.

./tests/Browser/InviteRequestTest.php works fine.

./tests/Invitation/Browser/InviteRequestTest.php does not.

No tests executed.

Feb
16
8 months ago
Feb
15
8 months ago
Activity icon

Replied to Multiple Domains W/ Single Laravel Install

Hey!

Thanks for responding.

Interesting idea.

Thanks for the response. Because dump doesn't kill the script is falls through. So, it is getting to the inside content, the Route::get - but not as expected. I figured it would only get inside the one with the corresponding domain main. In other words, if it didn't match, PRO wouldn't show up, but it does.

To be longwinded for posterity.

The problem appears to have been in the use of Route::group with the domain key in the array.

When I switched to using dump, the pro.local site was different because it checked the groups first, then died at the HELLO. So, I changed everything to use Route::domain:

Route::domain('pro.local')->group(function () {
  Route::get('/', function () {
    dump('PRO');
  });
});

Route::domain('media.local')->group(function () {
  Route::get('/', function () {
    dump('MEDIA');
  });
});

Route::domain('software.local')->group(function () {
  Route::get('/', function () {
    return view('welcome');
  });
});

And it works as expected. However, the Route::group with domain does not.

Thanks for giving me a different angle!

Cheers, Josh

Feb
14
8 months ago
Activity icon

Started a new conversation Multiple Domains W/ Single Laravel Install

Sort of consolidating a few questions that are old, unresolved, and kind of in keeping with my own problem.

Routes file:

echo url()->current() ."<br>";

echo request()->getHost();

Route::domain('pro.local')->group(function () {
  Route::get('/', function () {
    dd('HELLO');
  });
});

Route::group(['domain' => 'pro.local'], function() {
    dd('PRO');
});

Route::group(['domain' => 'media.local'], function() {
    dd('MEDIA');
});

Route::group(['domain' => 'software.local'], function() {
    dd('SOFTWARE');
});

Route::get('/', function () {
    return view('welcome');
});

Desire & environment: Three domains pro.local, media.local, and software.local all pointing to the same public folder using MAMP PRO 5.2 and Laravel 5.7. This is all I have done to the project so far.

Hypothesis: Using Route::domain or Route::group should result in returning the dd() text or the welcome template.

So far: I know the mono-repo setup I'm using works because I've had the three sites running off the mono-repo for about 3 years and can share the services and what not across projects. With that said, it's annoying to have to SSH into three separate folders to run composer update and npm update; especially when the composer.json and package.json files for each project is essentially the same...I currently use gulp to move and copy files around to keep things in sync.

Problem: No matter the domain, only PRO gets echoed.

I have screenshots on stack as well - because images

Similar questions

Might have missed a few. I only looked at the first page of results from a search and think I didn't actually paste at least one - all stale - all unresolved.

Activity icon

Replied to Multiple Domain Sites With Same Codebase

Attempting something similar. Only for me I'm looking to install Laravel once + point the domain names to the single public directory. Running into issues with Route::domain and Route:group not working quite as described in various tutorials and working attempts from others.

Activity icon

Replied to Multiple Domains Same Code Base

Similar question except I'm trying to have a single install + multiple domains pointing to the same public folder on the server. Running into issues with domain routes.

Nov
20
1 year ago
Activity icon

Replied to File-based Sessions Not Working If "web" Middleware Assigned In Controller Constructor

https://stackoverflow.com/questions/41542802/laravel-cant-get-session-in-controller-constructor

This does seem to be a workable solution. Though seems a bit odd having to modify Kernal to do something that is "more convenient" according to the docs. Maybe it would be non-session-dependant middleware or something as there is a migration note related to having the Request in the constructor not being part of the framework feature set.

Activity icon

Replied to File-based Sessions Not Working If "web" Middleware Assigned In Controller Constructor

Should probably update the documentation then: https://laravel.com/docs/5.5/controllers#controller-middleware

Middleware may be assigned to the controller's routes in your route files:

Route::get('profile', '[email protected]')->middleware('auth');

However, it is more convenient to specify middleware within your controller's constructor. Using the middleware method from your controller's constructor, you may easily assign middleware to the controller's action. You may even restrict the middleware to only certain methods on the controller class:

Just spent a good few minutes trying to clean up my routes file and literally make it more convenient from my perspective. This is pretty much the advice I'm finding.

Oct
23
1 year ago
Activity icon

Started a new conversation Laravel 5.5 Extend Or Override Package Controller

What is the convention in Laravel 5.5 for extending (or overriding) a controller external to the main app and without essentially rewriting the front-end for the package in the app?

I have a package with its own routes and controllers. I'm running into a couple of situations where overriding a method in one of the controllers would be an elegant way to solve a problem; however, the solutions I've come to on my own seem less than ideal. It's not something I seem to need that often because the packages do pretty well on their own.

Sep
24
2 years ago
Activity icon

Replied to Assigning Middleware To Route::resource

Old thread.

Came up in search results. Here's what I decided to go with for L5.5:

Route::resource('resource', 'Controller', [
        'only' => [
            'index',
            'show'
        ]
    ])
    ->middleware(['web']);

Route::resource('resource', 'Controller', [
        'except' => [
            'index',
            'show'
        ]
    ])
    ->middleware(['web', 'auth']);

Not fully verified, but route:list shows the proper middlewares being applied.

Sep
13
2 years ago
Activity icon

Replied to Custom Model Delete()

Be sure you return the parent call. Seemed to make things work for me.

    public function delete()
    {
        // Do custom things. Like deleting other models 
        // not handled by cascade. For example:
       $this->semiRelatedModel->delete();

       // Model->delete() returns a boolean that seems
       // to be required.
       return parent::delete();
    }
Sep
12
2 years ago
Activity icon

Replied to Class Config Does Not Exist In Laravel 5.4

Call parent::setUp()

Sep
10
2 years ago
Activity icon

Replied to [Symfony\Component\Debug\Exception\FatalThrowableError] Parse Error: Syntax Error, Unexpected '$table' (T_VARIABLE)

For someone else who might have the same issue...and is going insane trying to figure it out...may not be a migrations error. My IDE did an autocomplete I didn't catch in my config/app.php under the providers key.

Sep
08
2 years ago
Activity icon

Replied to Laravel 5.1 Access Package Config Values

Here's an old unanswered question I stumbled on search. I don't know if you found your answer.

I think the config reference in Laravel 5+ operates in the same way as the view method. So, the full path would be required. This makes sense in some ways as the main reason, I think, for having a multi-level tree structure is to avoid conflicts. For example:

/config
    /your-vendor/
        googlecal.php
    /my-vendor/
        googlecal.php

If we did:

config('googlecal.client_id')

Which one should Laravel use?

Whereas if we did:

config('your-vendor.googlecal.client_id')

config('my-vendor.googlecal.client_id')

Now we can have two separate configurations. Granted I'm unable to think of a use case where this would be desired or needed; therefore, why bury the cofig in a multi-tier folder structure?

Apr
30
2 years ago
Activity icon

Started a new conversation Laravel 5.4 Fresh Install - Composer Update Results In Could Not Be Resolved Set Of Packages

Only happens after adding PHP Documentor to composer.json.

{
    "name": "laravel/laravel",
    "description": "The Laravel Framework.",
    "keywords": ["framework", "laravel"],
    "license": "MIT",
    "type": "project",
    "require": {
        "php": ">=5.6.4",
        "laravel/framework": "5.4.*",
        "laravel/tinker": "~1.0"
    },
    "require-dev": {
        "fzaninotto/faker": "~1.4",
        "mockery/mockery": "0.9.*",
        "phpunit/phpunit": "~5.7",
        "phpdocumentor/phpdocumentor": "2.9.*",
        "evert/phpdoc-md" : "~0.2.0"
    },
    "autoload": {
        "classmap": [
            "database"
        ],
        "psr-4": {
            "App\\": "app/"
        }
    },
    "autoload-dev": {
        "psr-4": {
            "Tests\\": "tests/"
        }
    },
    "scripts": {
        "post-root-package-install": [
            "php -r \"file_exists('.env') || copy('.env.example', '.env');\""
        ],
        "post-create-project-cmd": [
            "php artisan key:generate"
        ],
        "post-install-cmd": [
            "Illuminate\\Foundation\\ComposerScripts::postInstall",
            "php artisan optimize"
        ],
        "post-update-cmd": [
            "Illuminate\\Foundation\\ComposerScripts::postUpdate",
            "php artisan optimize"
        ]
    },
    "config": {
        "preferred-install": "dist",
        "sort-packages": true,
        "optimize-autoloader": true
    }
}

Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Conclusion: don't install symfony/finder 3.3.x-dev
    - Conclusion: don't install symfony/finder 3.2.x-dev
    - Conclusion: remove symfony/finder v3.2.7
    - Conclusion: don't install symfony/finder v3.2.7
    - Conclusion: don't install symfony/finder v3.2.6
    - Conclusion: don't install symfony/finder v3.2.5
    - Conclusion: don't install symfony/finder v3.2.4
    - Conclusion: don't install symfony/finder v3.2.3
    - Conclusion: don't install symfony/finder v3.2.2
    - Conclusion: don't install symfony/finder v3.2.1
    - Conclusion: don't install symfony/finder v3.2.0
    - Conclusion: don't install laravel/framework 5.4.x-dev
    - Conclusion: don't install symfony/finder v3.2.0-RC2
    - Installation request for phpdocumentor/phpdocumentor 2.9.* -> satisfiable by phpdocumentor/phpdocumentor[v2.9.0].
    - Conclusion: don't install symfony/finder v3.2.0-RC1
    - laravel/framework v5.4.21 requires symfony/finder ~3.2 -> satisfiable by symfony/finder[v3.2.7, 3.2.x-dev, 3.3.x-dev, v3.2.0, v3.2.0-BETA1, v3.2.0-RC1, v3.2.0-RC2, v3.2.1, v3.2.2, v3.2.3, v3.2.4, v3.2.5, v3.2.6].
    - laravel/framework v5.4.0 requires symfony/finder ~3.2 -> satisfiable by symfony/finder[v3.2.7, 3.2.x-dev, 3.3.x-dev, v3.2.0, v3.2.0-BETA1, v3.2.0-RC1, v3.2.0-RC2, v3.2.1, v3.2.2, v3.2.3, v3.2.4, v3.2.5, v3.2.6].
    - laravel/framework v5.4.1 requires symfony/finder ~3.2 -> satisfiable by symfony/finder[v3.2.7, 3.2.x-dev, 3.3.x-dev, v3.2.0, v3.2.0-BETA1, v3.2.0-RC1, v3.2.0-RC2, v3.2.1, v3.2.2, v3.2.3, v3.2.4, v3.2.5, v3.2.6].
    - laravel/framework v5.4.10 requires symfony/finder ~3.2 -> satisfiable by symfony/finder[v3.2.7, 3.2.x-dev, 3.3.x-dev, v3.2.0, v3.2.0-BETA1, v3.2.0-RC1, v3.2.0-RC2, v3.2.1, v3.2.2, v3.2.3, v3.2.4, v3.2.5, v3.2.6].
    - laravel/framework v5.4.11 requires symfony/finder ~3.2 -> satisfiable by symfony/finder[v3.2.7, 3.2.x-dev, 3.3.x-dev, v3.2.0, v3.2.0-BETA1, v3.2.0-RC1, v3.2.0-RC2, v3.2.1, v3.2.2, v3.2.3, v3.2.4, v3.2.5, v3.2.6].
    - laravel/framework v5.4.12 requires symfony/finder ~3.2 -> satisfiable by symfony/finder[v3.2.7, 3.2.x-dev, 3.3.x-dev, v3.2.0, v3.2.0-BETA1, v3.2.0-RC1, v3.2.0-RC2, v3.2.1, v3.2.2, v3.2.3, v3.2.4, v3.2.5, v3.2.6].
    - laravel/framework v5.4.13 requires symfony/finder ~3.2 -> satisfiable by symfony/finder[v3.2.7, 3.2.x-dev, 3.3.x-dev, v3.2.0, v3.2.0-BETA1, v3.2.0-RC1, v3.2.0-RC2, v3.2.1, v3.2.2, v3.2.3, v3.2.4, v3.2.5, v3.2.6].
    - laravel/framework v5.4.14 requires symfony/finder ~3.2 -> satisfiable by symfony/finder[v3.2.7, 3.2.x-dev, 3.3.x-dev, v3.2.0, v3.2.0-BETA1, v3.2.0-RC1, v3.2.0-RC2, v3.2.1, v3.2.2, v3.2.3, v3.2.4, v3.2.5, v3.2.6].
    - laravel/framework v5.4.15 requires symfony/finder ~3.2 -> satisfiable by symfony/finder[v3.2.7, 3.2.x-dev, 3.3.x-dev, v3.2.0, v3.2.0-BETA1, v3.2.0-RC1, v3.2.0-RC2, v3.2.1, v3.2.2, v3.2.3, v3.2.4, v3.2.5, v3.2.6].
    - laravel/framework v5.4.16 requires symfony/finder ~3.2 -> satisfiable by symfony/finder[v3.2.7, 3.2.x-dev, 3.3.x-dev, v3.2.0, v3.2.0-BETA1, v3.2.0-RC1, v3.2.0-RC2, v3.2.1, v3.2.2, v3.2.3, v3.2.4, v3.2.5, v3.2.6].
    - laravel/framework v5.4.17 requires symfony/finder ~3.2 -> satisfiable by symfony/finder[v3.2.7, 3.2.x-dev, 3.3.x-dev, v3.2.0, v3.2.0-BETA1, v3.2.0-RC1, v3.2.0-RC2, v3.2.1, v3.2.2, v3.2.3, v3.2.4, v3.2.5, v3.2.6].
    - laravel/framework v5.4.18 requires symfony/finder ~3.2 -> satisfiable by symfony/finder[v3.2.7, 3.2.x-dev, 3.3.x-dev, v3.2.0, v3.2.0-BETA1, v3.2.0-RC1, v3.2.0-RC2, v3.2.1, v3.2.2, v3.2.3, v3.2.4, v3.2.5, v3.2.6].
    - laravel/framework v5.4.19 requires symfony/finder ~3.2 -> satisfiable by symfony/finder[v3.2.7, 3.2.x-dev, 3.3.x-dev, v3.2.0, v3.2.0-BETA1, v3.2.0-RC1, v3.2.0-RC2, v3.2.1, v3.2.2, v3.2.3, v3.2.4, v3.2.5, v3.2.6].
    - laravel/framework v5.4.2 requires symfony/finder ~3.2 -> satisfiable by symfony/finder[v3.2.7, 3.2.x-dev, 3.3.x-dev, v3.2.0, v3.2.0-BETA1, v3.2.0-RC1, v3.2.0-RC2, v3.2.1, v3.2.2, v3.2.3, v3.2.4, v3.2.5, v3.2.6].
    - laravel/framework v5.4.20 requires symfony/finder ~3.2 -> satisfiable by symfony/finder[v3.2.7, 3.2.x-dev, 3.3.x-dev, v3.2.0, v3.2.0-BETA1, v3.2.0-RC1, v3.2.0-RC2, v3.2.1, v3.2.2, v3.2.3, v3.2.4, v3.2.5, v3.2.6].
    - laravel/framework v5.4.21 requires symfony/finder ~3.2 -> satisfiable by symfony/finder[v3.2.7, 3.2.x-dev, 3.3.x-dev, v3.2.0, v3.2.0-BETA1, v3.2.0-RC1, v3.2.0-RC2, v3.2.1, v3.2.2, v3.2.3, v3.2.4, v3.2.5, v3.2.6].
    - laravel/framework v5.4.3 requires symfony/finder ~3.2 -> satisfiable by symfony/finder[v3.2.7, 3.2.x-dev, 3.3.x-dev, v3.2.0, v3.2.0-BETA1, v3.2.0-RC1, v3.2.0-RC2, v3.2.1, v3.2.2, v3.2.3, v3.2.4, v3.2.5, v3.2.6].
    - laravel/framework v5.4.4 requires symfony/finder ~3.2 -> satisfiable by symfony/finder[v3.2.7, 3.2.x-dev, 3.3.x-dev, v3.2.0, v3.2.0-BETA1, v3.2.0-RC1, v3.2.0-RC2, v3.2.1, v3.2.2, v3.2.3, v3.2.4, v3.2.5, v3.2.6].
    - laravel/framework v5.4.5 requires symfony/finder ~3.2 -> satisfiable by symfony/finder[v3.2.7, 3.2.x-dev, 3.3.x-dev, v3.2.0, v3.2.0-BETA1, v3.2.0-RC1, v3.2.0-RC2, v3.2.1, v3.2.2, v3.2.3, v3.2.4, v3.2.5, v3.2.6].
    - laravel/framework v5.4.6 requires symfony/finder ~3.2 -> satisfiable by symfony/finder[v3.2.7, 3.2.x-dev, 3.3.x-dev, v3.2.0, v3.2.0-BETA1, v3.2.0-RC1, v3.2.0-RC2, v3.2.1, v3.2.2, v3.2.3, v3.2.4, v3.2.5, v3.2.6].
    - laravel/framework v5.4.7 requires symfony/finder ~3.2 -> satisfiable by symfony/finder[v3.2.7, 3.2.x-dev, 3.3.x-dev, v3.2.0, v3.2.0-BETA1, v3.2.0-RC1, v3.2.0-RC2, v3.2.1, v3.2.2, v3.2.3, v3.2.4, v3.2.5, v3.2.6].
    - laravel/framework v5.4.8 requires symfony/finder ~3.2 -> satisfiable by symfony/finder[v3.2.7, 3.2.x-dev, 3.3.x-dev, v3.2.0, v3.2.0-BETA1, v3.2.0-RC1, v3.2.0-RC2, v3.2.1, v3.2.2, v3.2.3, v3.2.4, v3.2.5, v3.2.6].
    - laravel/framework v5.4.9 requires symfony/finder ~3.2 -> satisfiable by symfony/finder[v3.2.7, 3.2.x-dev, 3.3.x-dev, v3.2.0, v3.2.0-BETA1, v3.2.0-RC1, v3.2.0-RC2, v3.2.1, v3.2.2, v3.2.3, v3.2.4, v3.2.5, v3.2.6].
    - Conclusion: don't install symfony/finder v3.2.0-BETA1
    - Installation request for laravel/framework 5.4.* -> satisfiable by laravel/framework[5.4.x-dev, v5.4.0, v5.4.1, v5.4.10, v5.4.11, v5.4.12, v5.4.13, v5.4.14, v5.4.15, v5.4.16, v5.4.17, v5.4.18, v5.4.19, v5.4.2, v5.4.20, v5.4.21, v5.4.3, v5.4.4, v5.4.5, v5.4.6, v5.4.7, v5.4.8, v5.4.9].
Apr
06
2 years ago
Activity icon

Replied to .env Variables In Gulpfile.js

@martinbean

Might be nice to be able to change src paths based on environment without having to .gitignore the gulpfile.js and maintain different ones in all the environments.

// .env
APP_ENV=local
// gulpfile.js
if (env(APP_ENV) == 'local') {
    gulp.task('locals', function() {
        return gulp.src('../[some folder name]/**/*')
            .pipe(gulp.dest('[some local app path]'));
    });

} else if (env(APP_ENV) == 'prod') {
    gulp.task('locals', function() {
        return gulp.src('../../../[some folder name]/**/*')
            .pipe(gulp.dest('[some local app path]'));
    });
}

Server folder structure:

/site1
    /app
    /...
/site2
    /app
    /...
/site3
    /app
    /...
/universals-that-cannot-go-into-package-management
Apr
03
2 years ago
Activity icon

Started a new conversation Script Npm Update Handling The Post-update-cmd Event Returned With An Error

Apologies if this is a duplicate.

  [RuntimeException]                                                        
  Error Output: npm ERR! Linux 3.14.52-vs2.3.6.15-1                         
  npm ERR! argv "/usr/local/dh/nodejs/bin/node" "/usr/bin/npm" "update"     
  npm ERR! node v0.12.0                                                     
  npm ERR! npm  v2.5.1                                                      
  npm ERR! Unsupported URL Type: github:jeroennoten/webpack-stream#patch-1  
  npm ERR!                                                                  
  npm ERR! If you need help, you may report this error at:                  
  npm ERR!     <http://github.com/npm/npm/issues>                           
  npm ERR! Please include the following file with any support request:      
...
  1. Believe this would be related to Elixir.
  2. Not sure if this is an NPM issue that needs to be reported there, or if this is strictly related to Laravel 5.4 Elixir implementation.
  3. Could also be a simple fix I can perform.

I get the error when Laravel runs npm update after composer update as well when running npm update myself.

Activity icon

Replied to Php Artisan Commands Not Recognized

Running into the same issue.

  1. PHP 5.6.29 (cli) (built: Dec 9 2016 23:39:41)
  2. I'm not sure I'm following this question.
Dec
14
2 years ago
Activity icon

Started a new conversation Return Only Unique Strings

Not sure if this is the right channel per se, or if this question has already been asked.

I have a schema with a field that accepts a slugged string. This schema also has a relationship id field. Therefore, the slug field does not need to be unique unless the relationship id is also the same.

| Slug  | relationship_id |
|-------|-----------------|
| Hello |        1        |
| Hello |        2        |
| Sup   |        1        |
| Hello |        3        |
| Sup   |        2        |

What I would like to do is have a query (or model request) that gets a result set containing only the unique slugs in it - regardless of the id.

Collection {
    [
        'hello', 
        'sup'
    ]
}

Is that possible; or should I be looking for something else.

Dec
10
2 years ago
Activity icon

Replied to Zurb Foundation 6 And Laravel 5.3

Copying using Elixir might be worth mentioning as well:

// gulpfile.js
elixir(mix => {
    mix.copy(
        'vendor/zurb/foundation/dist/foundation.js',
        'resources/assets/js'
    );
    mix.sass('app.scss')
       .webpack('app.js');
});

I have not tried copying individual pieces of the Foundation JS suite, but should work the same with the additional solution provided by @Laraveldeep

(Got here through a low level of frustration and a Google search. @Laraveldeep got me close, copying got me the rest of the way. Makes adding Foundation essentially a two step process.)

Feb
22
3 years ago
Activity icon

Replied to L5 Maximum Function Nesting Level Of '100' Reached, Aborting!

I am testing form submission.

I created a custom Request used in the controller.

class RegistrationController extends Controller
{
    public function store(RegistrationFormRequest $request) {

    }
}

The following also results in the same PHPUnit error:

class RegistrationController extends Controller
{
    public function store(Request $request) {

    }
}

However, the following does not result in error:

class RegistrationController extends Controller
{
    public function store() {
        $request = \Request::all();
        ...

    }
}

Just in case someone is actually paying attention to this thread on the team. Because, while it may be an xDebug issue - there may also be an unknown performance hit being caused by this sort of thing.

Cheers.