Nash

Nash

Member Since 3 Years Ago

Experience Points 78,400
Experience Level 16

1,600 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 200
Lessons
Completed
Best Reply Awards 89
Best Reply
Awards
  • Start Your Engines Achievement

    Start Your Engines

    Earned once you have completed your first Laracasts lesson.

  • First Thousand Achievement

    First Thousand

    Earned once you have earned your first 1000 experience points.

  • One Year Member Achievement

    One Year Member

    Earned when you have been with Laracasts for 1 year.

  • Two Year Member Achievement

    Two Year Member

    Earned when you have been with Laracasts for 2 years.

  • Three Year Member Achievement

    Three Year Member

    Earned when you have been with Laracasts for 3 years.

  • Four Year Member Achievement

    Four Year Member

    Earned when you have been with Laracasts for 4 years.

  • Five Year Member Achievement

    Five Year Member

    Earned when you have been with Laracasts for 5 years.

  • School In Session Achievement

    School In Session

    Earned when at least one Laracasts series has been fully completed.

  • Welcome To The Community Achievement

    Welcome To The Community

    Earned after your first post on the Laracasts forum.

  • Full Time Learner Achievement

    Full Time Learner

    Earned once 100 Laracasts lessons have been completed.

  • Pay It Forward Achievement

    Pay It Forward

    Earned once you receive your first "Best Reply" award on the Laracasts forum.

  • Subscriber Achievement

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • Lifer Achievement

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • Laracasts Evangelist Achievement

    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 Achievement

    Chatty Cathy

    Earned once you have achieved 500 forum replies.

  • Laracasts Veteran Achievement

    Laracasts Veteran

    Earned once your experience points passes 100,000.

  • Ten Thousand Strong Achievement

    Ten Thousand Strong

    Earned once your experience points hits 10,000.

  • Laracasts Master Achievement

    Laracasts Master

    Earned once 1000 Laracasts lessons have been completed.

  • Laracasts Tutor Achievement

    Laracasts Tutor

    Earned once your "Best Reply" award count is 100 or more.

  • Laracasts Sensei Achievement

    Laracasts Sensei

    Earned once your experience points passes 1 million.

  • Top 50 Achievement

    Top 50

    Earned once your experience points ranks in the top 50 of all Laracasts users.

15 Feb
4 days ago

Nash left a reply on Laravel And Webmail Url Conflict

I don't know what your exact setup is, but it might be easier to just use a subdomain, e.g. webmail.larabits.com, for your Roundcube installation rather than using the same as your Laravel application (ww.larabits.com/larabits.com).

08 Feb
1 week ago

Nash left a reply on Using TinyMCE Editor

Probably nothing more to it than adding a textarea (either manually with <textarea> or using Form::textarea) and giving it the right id attribute if needed.

The official docs or this tutorial should give you the basic idea: https://artisansweb.net/install-use-tinymce-wysiwyg-html-editor-laravel/

Nash left a reply on Documentation

phpDocumentor can generate documentation from your PHP source code. Another popular tool is Doxygen that supports multiple languages.

If you want to create documentation for your application (similar to the Laravel docs), there's a neat package called LaRecipe.

07 Feb
1 week ago

Nash left a reply on Laravel Forge What Does Enable Quick Deploy Actually Do?

@MARKOTITEL - I would assume that it uses Git hooks to do this.

Git hooks are scripts that run automatically every time a particular event occurs in a Git repository. They let you customize Git’s internal behavior and trigger customizable actions at key points in the development life cycle.

https://www.atlassian.com/git/tutorials/git-hooks

06 Feb
1 week ago

Nash left a reply on Showcase Site For Your Application, Laravel Or Wordpress?

Wink by Laravel core developer Mohammed Said also looks really promising, though it is still in its early stages.

Nash left a reply on Showcase Site For Your Application, Laravel Or Wordpress?

AFAIK, it is quite common to do it like that. If your showcase website is no more than a few static pages with content that rarely changes, it could be easier to just make them with Laravel. But if you need multiple pages with easily modifiable content, Wordpress or some other CMS might also be a good solution; it's up to you. I would suggest keeping them on separate servers so they can't affect each other in case of problems, e.g. if someone takes down/gains access to the site through a vulnerable WP plugin or vice versa.

Nash left a reply on Simple Update Not Working.

Have you specified role as a $fillable attribute in your User model?

05 Feb
2 weeks ago

Nash left a reply on Var_dumpling Alternatives For Firefox?

According to var_dumpling's own Github page:

Firefox

Development

  • Go to the add-ons manager (cmd shift A for OSX)
  • Under the settings button select "install add-on from file.."
  • Load the .xpi file located in /firefox/builds

https://github.com/alexnaspo/var_dumpling

Nash left a reply on Var_dumpling Alternatives For Firefox?

@CHRON - You could always install Symfony's VarDumper component, it's the one Laravel uses.

Nash left a reply on Var_dumpling Alternatives For Firefox?

Laravel's dd() method will format the output nicely and Firefox already does this for JSON responses (at least the Developer Edition does).

Nash left a reply on Laravel 5.6 - Backup MySql Database To S3?

No need to re-invent the wheel. The Laravel Backup package by Spatie can backup your db and/or whole application to S3 and is super simple to use.

https://github.com/spatie/laravel-backup

04 Feb
2 weeks ago

Nash left a reply on Forge -CSS Files Cached?

Try php artisan cache:clear instead of config:clear. Could also be your browser cache. Try CTRL+R to refresh.

Nash left a reply on Subscription

Try out some of the free videos (there are plenty) and then decide if you want more? If you want to discuss billing you should probably contact support directly.

Nash left a reply on Laracasts T-Shirt Shop Gone?

+1 I want one too!

Nash left a reply on Config('value') Returns Null

Maybe your config file is referring to an environmental variable that you have not set locally in your .env file? It would be easier to help if your showed us your code.

24 Jan
3 weeks ago

Nash left a reply on Securing AWS Buckets When Using Apis.

You could hide the URL from unauthenticated users in your own application. It is unlikely that someone would guess the URL for your AWS image, but if your really want to secure the image, then you need to route the request through your own application and have the app fetch the image from storage and return it to the user (as opposed to linking directly to the image). Keep in mind that this method is slower. You can also create temporary URL's for S3, but that's probably not what you have in mind.

18 Jan
1 month ago

Nash left a reply on SIMPLE JS ERROR -> Accepting Multiple Value In Method

Your method has 3 parameters but you are passing 2 values. Try:

updateThemeSwitch: function (elemstatus, name) {

}
16 Jan
1 month ago

Nash left a reply on Send E-Mails With API In Europe (General Data Protection Regulation)

Mailgun provides both US and EU as regions nowadays and are "fully GDPR compliant" (according to themselves). Also, GDPR does not require the data to be stored in the EU but you need to inform your users about what you store and where.

10 Dec
2 months ago

Nash left a reply on How To Push A Job Into Queue?

Have you actually configured the queue driver/connection to something other than sync, e.g. database, beanstalkd, sqs or redis? Otherwise, the jobs will just execute immediately.

https://laravel.com/docs/5.7/queues#driver-prerequisites

08 Dec
2 months ago

Nash left a reply on Not Able To Deploy

It may be easier to just provision a new server and set things up from scratch if things are messed up. Here's a guide on solving public key problems in Forge.

Nash left a reply on Not Able To Deploy

That shouldn't happen. Have you added anything that requires root privileges to your deployment script?

06 Dec
2 months ago

Nash left a reply on Undefined Variable: Categories (View: E:\lara-test1\resources\views\posts\create.blade.php)

@petrit You probably mean ->with('categories', $categories) or ->with(compact('categories')). In any case, dynamic "with" variable names like ->withCategories($categories) should work just as well.

Nash left a reply on Undefined Variable: Categories (View: E:\lara-test1\resources\views\posts\create.blade.php)

You seem to be passing $categories to the posts.create view correctly but you have @section('content') twice in your view. Perhaps that could be causing the issue?

Nash left a reply on Static Methods And Method Chaining

You can use regular non-static methods and simply return $this. Laravel uses something called facades in some places to serve as a "static proxy" to your regular methods. Alteratively, you could use dependency injection.

05 Dec
2 months ago

Nash left a reply on How Can I Backup A Laravel Project To Box?

The Laravel Backup package by Spatie is really good and can back up both your files and database to any filesystem you have configured in Laravel. Laravel's filesystem [works with FTP](See https://laravel.com/docs/master/filesystem#driver-prerequisites) but you'll have to add the configuration to filesystems.php manually. Please note that FTP is not a secure protocol.

29 Nov
2 months ago

Nash left a reply on Forge Is Not Running My Migrations In My Deploy Script

It seems the default deployment script uses php artisan migrate --force...it just slipped my mind since I rarely run that command manually on the prod server.

Nash left a reply on Forge Is Not Running My Migrations In My Deploy Script

migrate:fresh drops all the tables and runs through the up methods, which is something you typically don't want to do on your production database; hence the command getting canceled. You can SSH into your server and run the command manually if you want to (it will ask for verification if you do this in your production environment).

If you just want to update the database with new tables or changes, just php artisan migrate should suffice.

Nash left a reply on Testing Commands That Die

@ARVISTO - I'm not entirely sure what you mean but you should be able to throw an exception in the constructor (e.g. throw new \Exception("Cannot instantiate command");) just fine.

27 Nov
2 months ago

Nash left a reply on Testing Commands That Die

Instead of die you could just have your command throw an exception or return a boolean false when the incorrect env is set and test against that.

You can test an exception like this:


public function testException()
{
    $this->expectException(SomeException::class);

    // code that should trigger the exception goes here
}

or use $this->assertFalse() for testing the boolean.

25 Nov
2 months ago

Nash left a reply on Laravel Github & Licensing

That depends entirely on what you want people to be able to do (or not do) with your software. Some licenses allow people to do pretty much anything while others can be very restrictive.

These links should give you a better overview of the subject:

23 Nov
2 months ago

Nash left a reply on .env Variables Returns Null

@lmatab You're welcome. Please mark the thread as solved to help others.

Nash left a reply on Why Isn't Laravel Core Still Type-hinted?

These tests are not that great probably

That is highly subjective but I can see your point.

Nash left a reply on Why Isn't Laravel Core Still Type-hinted?

@roborobok Yeah, I just meant that there are situations where it could be beneficial, since you were wondering if there are any potential benefits to avoiding type hints...I can't really say for the core though. Some developers are not that into type hinting and strongly typed languages and others swear by it. In the end, it's a matter of personal preference. Still, you would probably have some tests for those methods anyways.

Nash left a reply on Why Isn't Laravel Core Still Type-hinted?

There are cases where it could come in handy, for example, if you have a method that accepts a string for a single value or an array for multiple values (like many methods in Laravel do). In those cases, you couldn't use type-hinting because you can't specify multiple types. Regardless, you should still have written tests.

22 Nov
2 months ago

Nash left a reply on Payment Methods For A Marketplace In The EU

There's always PayPal but other than that, I'd say it varies from country to country. If you don't want to use credit cards for payment, you'll probably be looking at some sort of bank transfer service and will probably need to use some local provider. Check out some local eCommerce sites and see what they use or ask them or your bank directly.

You could also just display or email the billing information and account number to your customer and have them make the bank transfer manually, but then you'll probably have to verify all payments and orders manually, which is a bit of a hassle.

21 Nov
2 months ago

Nash left a reply on Forking Laravel Repo

Are you forking it because you want to contribute to the framework or because you want to change/override an existing method in the RegistersUsers trait for your application? If you only want to override a method, you can do so by making a method with the same name in the class where the trait in use.

For example, if you want the showRegistrationForm() method to behave differently in your RegisterController.php, just copy the method there and it will override the one in RegistersUsers.php

Nash left a reply on Which CSS Framework Is Laracasts Using?

The new (blue) design uses Tailwind. The old (green) used Bulma, I think.

16 Nov
3 months ago

Nash left a reply on Laravel Shows No Errors But Doesnt Send Mail

@AREG - You need to add and verify a real domain to send with Mailgun.

If that's not possible, you could use the SMTP driver with your own Gmail or something like that or send email directly from your server (mail driver "sendmail" or "mail"). You still need to configure DNS records (SPF, DKIM, DMARC) for the "from" domain if you send from your own server though.

15 Nov
3 months ago

Nash left a reply on Laravel Shows No Errors But Doesnt Send Mail

Are you still in sandbox mode and have you added your "to" address to authorized recipients in the Mailgun dashboard? The sandbox subdomain is for testing and can only send to authorized recipients.

Nash left a reply on Help With Recursion

Perhaps you could use a class variable instead?

private $some_variable = [];

...and in your method:

$this->some_variable[] = "something"; // or something similar depending on your needs
13 Nov
3 months ago

Nash left a reply on Paginate () Method With Errors

@DANIEL21GT - The code you pasted does not contain a variable named $users nor any pagination with ->appends()?

Nash left a reply on Paginate () Method With Errors

Are you appending "numero" to the links/query string for subsequent requests?

{{ $users->appends(['numero' => $request->numero])->links() }}

12 Nov
3 months ago

Nash left a reply on Auth Check Public Folder Php File?

@CODER_UZB - Just be aware that re-enabling serialization can potentially become a security risk. See my previous post.

Nash left a reply on Auth Check Public Folder Php File?

Take a look at the section on Cookie Serialization in the 5.5 (security release) upgrade guide:

https://laravel.com/docs/5.5/upgrade#upgrade-5.5.42

11 Nov
3 months ago

Nash left a reply on Looking For Best Way To Setup A VPS Server

Many VPS providers have various one-click setups for LAMP, LEMP etc, but if you are new to all this you may want to consider using a server management service like Laravel Forge (official Laravel product). Forge installs (almost) everything you need for you and lets you configure important stuff and handle deployments. You still need a separate VPS provider like DigitalOcean or AWS though.

Check out the Laracasts series on Laravel Forge: https://laracasts.com/series/learn-laravel-forge

09 Nov
3 months ago

Nash left a reply on Can You "embed" A FormRequest Object Within Another FormRequest Object?

Maybe something among the lines of this?

class SomeBulkFormRequest extends FormRequest
{
    ...

    public function rules()
    {
        $rules = 
            (new SomeFormRequest)->rules() + 
            (new SomeOtherFormRequest)->rules() 
        ;

        if ($this->input('some_field')) {
            $rules += (new SomeConditionalFormRequest)->rules()
        }

        return $rules;
    }

}

You could probably make this prettier by storing the class names in a separate array/class variable and then instantiate them dynamically and append the rules to the $rules array or something like that.

Nash left a reply on .env Variables Returns Null

If you cache the config, you can't use env() in your application (only in config files). Use config() instead and env() only in config files or don't cache the config.

If you execute the config:cache command during your deployment process, you should be sure that you are only calling the env function from within your configuration files. Once the configuration has been cached, the .env file will not be loaded and all calls to the env function will return null.

Configuration Caching

08 Nov
3 months ago

Nash left a reply on Accessing JSON In TEXT Columns

Try json_decode($value, true) if you want an associative array. See http://php.net/manual/en/function.json-decode.php

To query the column, try using a JSON column instead of TEXT and make sure your database version supports it:

Laravel also supports querying JSON column types on databases that provide support for JSON column types. Currently, this includes MySQL 5.7, PostgreSQL, SQL Server 2016, and SQLite 3.9.0 (with the JSON1 extension).

https://laravel.com/docs/5.7/queries#json-where-clauses