Jaytee

at Student at Ara Institute

Experience

70,285

73 Best Reply Awards

  • Member Since 1 Year Ago
  • 321 Lessons Completed
  • 1 Favorite

20th June, 2017

Jaytee left a reply on Are You All Using Vagrant ? • 6 days ago

Well..... I honestly haven't touched a VM for some months now. I've just used Valet as it suits my requirements.

12th June, 2017

Jaytee left a reply on Auth()->attempt(request(), $remember) • 2 weeks ago

This is from the documentation:

If you would like to provide "remember me" functionality in your application, you may pass a boolean value as the second argument to the attempt method, which will keep the user authenticated indefinitely, or until they manually logout. Of course, your users table must include the string remember_token column, which will be used to store the "remember me" token.

Now, notice how it states 'indefinitely'. If the second argument for attempt() is false, then I believe it defaults to the configuration files (see: config/session).

You'll see two options in config/session.

'lifetime' => 120 // 2 hours,
'expire_on_close' => false // dont delete session on browser close.

7th June, 2017

Jaytee left a reply on 403 Error Forbidden Path Laravel Homestead 2.0 • 2 weeks ago

Uhh the app_path will go to /my/root/folder

Check the docs here: https://laravel.com/docs/master/helpers#method-app-path

you can use public_path or asset and they'll take you to the public directory.

5th June, 2017

Jaytee left a reply on Trying To Make Use Of The Laravel Installer • 3 weeks ago

@lifesound Open a new thread next time.

You'll need to add it to your .zshrc file to persist it

Jaytee left a reply on 403 Error Forbidden Path Laravel Homestead 2.0 • 3 weeks ago

It'll be a permission issue. The app folder is meant to be secure right, since it houses your application code.

You can use the public directory for your assets, that's why the directory exists.

25th May, 2017

Jaytee left a reply on I Am Getting "This Page Isn’t Working. Localhost Is Currently Unable To Handle This Request. HTTP ERROR 500" • 1 month ago

Check that an infinite loop isn't occurring in all of the files relating to the route. I'm pretty sure I had this same error a while back as I was looping indefinitely.

24th May, 2017

Jaytee left a reply on Compatibility With IE11 Or Other Mobile Browsers. • 1 month ago

all Internet Explorer versions don't fully support flex. You can use a great website called: caniuse.com.

19th May, 2017

Jaytee left a reply on Parse Error • 1 month ago

Don't use route() when calling a method on a controller. Use action()

18th May, 2017

Jaytee left a reply on Properly Store Something In The DB • 1 month ago

It's personal preference. The helper is still doing the same behind the scenes :)

As for validating, you can do something like this on the Controller:

$this->validate($request, [
    // validation rules here
]);

// or using the helper function

$this->validate(request(), [
    // validation rules here
]);

Helpers are great since you don't need to import any classes. They're also cleaner too and often allow you to pass arguments without needing to chain additional methods.

In your text editor, you can search up the helpers.php file. The directory is Illuminate\Foundation

Jaytee started a new conversation Notifications Bar Doesn't Stay Toggled • 1 month ago

Ohhhhhhhh Jeffreyyyyy,

Quick and easy.

Steps to reproduce:

  • Open notifications sidebar
  • Close notifications sidebar
  • Open notifications sidebar again

Using Chrome version: 58.0.3029.110

You'll notice that the sidebar doesn't stay toggled.

17th May, 2017

Jaytee left a reply on Code Inside Event Listener Not Working • 1 month ago

Check the EventServiceProvider.

You should have an array similar to this:

protected $listen = [
        'App\Events\MyAwesomeEvent' => [
            'App\Listeners\MyAwesomeListener',
        ],
];

Jaytee left a reply on Properly Store Something In The DB • 1 month ago

You can use the request that is injected into the method or you can use the global helper function request(). If you use the helper function, you don't need to inject the request into the method.

There are numerous ways you can request data with both methods also, here's some:

$request->input('name')
$request->name
request('name')
request()->name
request()->input('name')

16th May, 2017

Jaytee left a reply on Lets-Build-a-Forum-in-Laravel - Lesson 38 - Pagination Issue • 1 month ago

I haven't watched the lesson but if you could post the code so others can review it and try and help you, that would be good.

In the meantime, check up on the nginx issue as the latest versions of Valet do use Nginx now.

Jaytee left a reply on How To Build A Similar Site? • 1 month ago

What you want is a thing that we refer to as a 'Lightbox'.

I won't list any lightbox's here, but a quick google search will find what you're looking for and from there, you can evaluate the one that fits your needs.

Jaytee left a reply on Auth Attempt Fails If Username Is Not Unique • 1 month ago

Ehh, duplicate usernames shouldn't be used. The whole point of the authentication process is to log in a unique user.

If you want duplicate usernames then make them log in with a unique email instead.

13th May, 2017

Jaytee left a reply on NPM Issues With Laravel 5.4.21 • 1 month ago

Glad you got it working. I always always had issues with NPM on windows. Mac works a charm.

Jaytee left a reply on Laravel Assets Not Loading - 404 • 1 month ago

Make sure you updated your APP_URL in your .env to the live domain (or in this case, the IP address). Otherwise the asset helper will assume it to be localhost or similar.

Jaytee left a reply on MAMP To VALET (finally) ... Wrong PHP • 1 month ago

Uhh valet should be using the latest. If not, try re-install it again using homebrew.

brew install homebrew/php/php71

Jaytee left a reply on Laravel - Purpose And Different Between Web.php And Api.php • 1 month ago

The api file can do exactly what the web file can do. You can see this in the RouteServiceProvider.

The only difference is: the prefix and middleware.

Jaytee left a reply on [Symfony\Component\Debug\Exception\FatalThrowableError] Parse Error: Syntax Error, Unexpected End Of File • 1 month ago

It's a Syntax error like it says. Check your recent workings and find the syntax error. Likely a missing semi-colon.

Jaytee left a reply on Testing Laravel Appllication • 1 month ago

There's a couple of series here on Laracasts.

Testing Laravel: https://laracasts.com/series/phpunit-testing-in-laravel

Build a forum with Test Driven Development (where you build your application from tests. This one isn't much of a tutorial but you could definitely pick some things up) https://laracasts.com/series/lets-build-a-forum-with-laravel

12th May, 2017

Jaytee left a reply on Transition To Laravel • 1 month ago

So you're gonna be doing it from scratch since you don't use OOP or MVC. In that case, it's not worth running the Laravel version live with the regular version.

Develop it locally and completely separate and then make the switch once it's complete.

Jaytee left a reply on Must I Repeat The "options" For Each Mix.sass() Call? • 1 month ago

Alright, so according to the API, you can set a option on laravel mix to turn this off. You can see this in node-modules/laravel-mix/setup/webpack.mix.js

mix.options({
    processCssUrls: false
});

Jaytee left a reply on Laravel Cashier - Custom Webhooks Not Firing? • 1 month ago

You can also use the response helper function.

return response('webhook handled', 200);

With this, there is no need to instantiate a class or import the class.

Jaytee left a reply on Importing From Node_modules In Stylus With Laravel Mix • 1 month ago

@import "node_modules/path/to/file"

11th May, 2017

Jaytee left a reply on Laravel Can't Install, No Vendor File • 1 month ago

Homestead has nothing to do with Composer. If you aren't getting the vendor folder then you haven't installed Composer properly or aren't initialising it.

9th May, 2017

Jaytee left a reply on Session Not Working In Controller • 1 month ago

Okay so just to clarify a few things:

  1. Your route service provider should include the route middleware. If it does, then the web middleware should not be applied to any routes that you have created. If it doesn't, then you need to apply the web middleware to your routes.

  2. Are any errors thrown or is it just a blank page? instead of echoing the session, use dd(session('name')) and see what the results are.

  3. Make sure of course, you're actually creating the session by visiting the URL that stores the session and then try view it on the home page.

Jaytee left a reply on Route Getting Ignored • 1 month ago

Can you post your routes file please.

8th May, 2017

Jaytee left a reply on Laravel - Gulp Not Working When Sass Has Variable Declaration • 1 month ago

How are you calling gulp?

You should be using something like:

elixir(function(mix) {
    mix.sass('mysassfile.scss', 'myoutputlocation.css');
});

Jaytee left a reply on Laravel Elixir 5.3 "mix.combine() Is Not A Function" Error • 1 month ago

Use the mix.scripts instead for Laravel 5.1

Jaytee left a reply on Laravel5 And Bootstrap-select • 1 month ago

Can you show us your master template please. It's likely an incorrect path to the CSS files.

6th May, 2017

Jaytee left a reply on Onclick Not Working • 1 month ago

This is the line that's failing:

<a href="#" onclick="document.getElementById('logout-form').submit">Logout</a>

submit is a function so it needs to be called like this submit() not submit.

Now, You don't need this for what you're building. You can remove that link completely and replace it with one of these, either one will work.

<input type="submit" value="Logout">
<button type="submit">Logout</button>

You'll usually only use what you currently have when you're making use of Javascript (ajax) or if the link is outside of the form.

Jaytee left a reply on I Am Not Updating The Slug Field In My Table Of Articles • 1 month ago

Update your update method and change $articles->update() to $articles->save().

Also instead of using the fill method and then calling the title property to update it to an uppercase, just setup a Mutator on the Article model.

public function setTitleAttribute($value)
{
        $this->attributes['title'] = ucfirst($value);
}

Then when you call the fill method (although not recommended for mass assignment protection), it will automatically set the title to have an uppercase letter.

Jaytee left a reply on Date/time Is Not Inserted If I Use Format('Y-m-d H:i:s A') • 1 month ago

As far as i'm aware, dateTime columns and Timestamp columns won't accept the PM/AM. It should use a 24 hour format.

Jaytee left a reply on Homestead Domains Stop Working • 1 month ago

I use Valet also with OS 10.12.4. I also have to restart valet each time i start up my computer so i'm guessing it's just a mac issue?

I don't restart my computer often so it doesn't affect me as much.

BUT: a quick google search for that error brings back a common culprit: Antiviruses/Backup programs interfering.

Here's a couple of links for you to read through and see if it will solve your problem:

https://discussions.apple.com/thread/6467321?start=0&tstart=0

https://forums.macrumors.com/threads/websites-wont-load.1420764/

1st May, 2017

Jaytee left a reply on New Tests Not Found • 1 month ago

I do it all the time. I think everyone does :)

Jaytee left a reply on App For IPhone/iPad • 1 month ago

So what you really mean is, you want to save a click on your phone because you can't be bothered to type the URL.

Yeah.......... probably not.

Jaytee left a reply on New Tests Not Found • 1 month ago

Make sure your file names end with the word "Test".

For example:

"MyBlog" will fail to run but "MyBlogTest" will run.

28th April, 2017

Jaytee left a reply on Laravel Mix Put All Js Code Inside App.js • 1 month ago

Well, I can say it is possible however, I strongly recommend you don't.

the libs Javascripts are likely not going to change frequently so if you combine it with your main javascript, you're just going to be busting the cache every time which means the whole lot needs to be reloaded. Not to mention, you'll need to compile the whole lot every time you make a change.

I suggest keeping the two files separate. That way, when you make a change, only the cache will bust for your main javascript stylesheet thus, faster loading times.

Jaytee left a reply on [Network] What Is The Longest A Dynamic IP Can Be Assigned? • 1 month ago

@fideloper That doesn't seem to be my case as the modem is reset regularly and as i've explained above, power cuts happen often.

27th April, 2017

Jaytee left a reply on [Network] What Is The Longest A Dynamic IP Can Be Assigned? • 1 month ago

The modem is running v4 not v6. I'm not complaining but just wondering. If it stays this way, i can run some things from home.

Jaytee left a reply on [Network] What Is The Longest A Dynamic IP Can Be Assigned? • 1 month ago

You see that's the weird thing @jlucia . We frequently get power cuts due to the grid down the road. I say frequently, about every 3 months. We had one about a month ago that caused the power to stay off for around 4 hours and yet it's the same.

It's weird how the ISP requires you to purchase a static IP yet it's as if tho we have one haha

Jaytee started a new conversation [Network] What Is The Longest A Dynamic IP Can Be Assigned? • 1 month ago

Hey guys,

So this actually relates to my home network. I have a dynamic IP address. I know this because if I want a static ip, i have to add $10 per month.

Now i know dynamics can change whenever they like but looking at the logs, my IP address has not changed for a minimum of 5 months. 5 months ago was when our speeds were upgraded from 100down and 20up to 1000down and 500up with a new modem but it's just weird.

So my question is, does a dynamic IP actually last this long or is the modem somehow, keeping it static? I'm not really worried, but i just noticed it and thought, a bit strange considering before the new modem, it used to change frequently.

Cheers

26th April, 2017

Jaytee left a reply on Homestead First Vagrant Up Stuck • 2 months ago

Ummm, try download an older version of vagrant?

I personally haven't gone back to Homestead since Valet released but that may be a different case for you.

Jaytee left a reply on Homestead First Vagrant Up Stuck • 2 months ago

Did you complete this step from the documentation on Laravel?

If you are using Windows, you may need to enable hardware virtualization (VT-x). It can usually be enabled via your BIOS. If you are using Hyper-V on a UEFI system you may additionally need to disable Hyper-V in order to access VT-x.

Jaytee left a reply on How To Rename File In Subl With Emmet? • 2 months ago

You mean renaming/creating files etc yes? That's not part of Emmet. Jeff usually uses this plugin here: https://github.com/skuroda/Sublime-AdvancedNewFile

As for the double clicking on a variable and changing multiple instances, that is part of Sublime. I can't remember the shortcut for that but you can find it on the sublime website.

23rd April, 2017

Jaytee left a reply on Cannot Recreate Migration Files. • 2 months ago

Delete the migrations table from your database and then try again.

Jaytee left a reply on Conditional Email Validation • 2 months ago

@Snapey That's what i thought but on a checkbox without a default value, when i did a check to see if it was equal to 1, it returned false. Comparing it against true came back true.

Jaytee left a reply on Laravel Mix Won't Compile Sass Files • 2 months ago

What does your webpack.mix.js file look like?

Make sure it includes

mix.sass('resources/assets/sass/app.scss', 'public/css/app.css');
mix.sass('resources/assets/sass/custom.scss', 'public/css/custom.css');

Or something similar along those lines.

Jaytee left a reply on Cannot Recreate Migration Files. • 2 months ago

Here's a good idea, why not create the folder yourself?

Edit Your Profile
Update

Want to change your profile photo? We pull from gravatar.com.