Komayo

Komayo

Member Since 4 Years Ago

Experience Points 9,185
Experience Level 2

815 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 1
Lessons
Completed
Best Reply Awards 2
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.

02 Aug
2 years ago

Komayo left a reply on @username Tagging

Thank you

Komayo started a new conversation @username Tagging

How it is called the feature, used in modern websites of tagging the member with @username? Like here in the forums.

15 Oct
3 years ago

Komayo left a reply on JQuery + Blade

I had put that code inside a blade.php file, then i included before the .js include. But that code is giving me a error, between : and @lang. expression expected is what it says.

14 Oct
3 years ago

Komayo started a new conversation JQuery + Blade

Hello guys,

    var $gbtn_aa = $('<a href="#">@lang("alpt/divisions.signuptoday")</a>');

I have this code and when used, jquery adds @lang as raw text and not interpreted. How can i properly use blade with jquery, or what iam doing wrong.

Thank you for the time to read and the future answers.

12 Sep
3 years ago

Komayo left a reply on Variable Passed To Route - Security.

I was unaware of that package, my solution for now is working but iam thinking in change for this later, seems way better.

Komayo started a new conversation Variable Passed To Route - Security.

Morning guys,

I am passing a variable to a route, {id}.

After the url of route, it will be like this

    route/path1/path2/{id}

Where {id} can be 1, 2 , 3, etc... If front-end user, change the url it goes to other id, if we are talking for example, in the route to edit profile, user can change other profiles...security issue.

My question, whats the best way to handle this situation?

10 Sep
3 years ago

Komayo left a reply on Decimal Column / Float Column

@jakeryansmith and @oeb, found the issue...

Its HeidiSQL option: 'Alternating row background: Local number format'. Seems a localization auto formatting of HeidiSQL. Disabled, and i got the right values. Thank you.

Komayo left a reply on Decimal Column / Float Column

@jakeryansmith iam pretty sure it saves with the comma, iam using heidisql to view the database data, and it shows with the commas. I already tryed that number_format function at the insert statement, still same result.

Komayo started a new conversation Decimal Column / Float Column

Hello guys,

Iam having here a issue, need some help of you. Iam trying to save a value to mysql (Decimal column). In my laravel schema as

    $table->decimal('sorder_by', 4, 2);

then in my php i have in the database seeder insert statement.

    ... 'sorder_by' => 20.42 ...

but always saves in mysql as 20,42 with a comma..... Tryed several diferent ways, cant make it save with a dot....

What iam doing wrong?

07 Sep
3 years ago

Komayo started a new conversation Select Single Record Issue...

Why this statement dont work directly

    $user = User::where('forum_username', '=', $forum_username);

Only works this way

    $user = User::where('forum_username', '=', $forum_username)->first();

But isnt 'first()' used to select single row on multiple records result set? This case, only 1 is returned...

06 Sep
3 years ago

Komayo left a reply on Combo Box Select Value From Database

I think your problem is with the values of combobox Vs database. Your saving 1 for bike 2 for car in database. But when you load them at a combobox or selectbox, default index is zero, 0. So your bike (1 in db) will be 0 in combobox. Car (2 in db) will be 1 ou combobox. So when you load combobox and try to edit bike it will show car. Because car índex in combo = 1 (same as bike in db). Usualy you need to sync the combos and selects boxes while retrieving data from database to fill them. Theres a few tricks. Personally myself i use always a array to sync the data. Because arrays also start at zero. So no issues. :).

05 Sep
3 years ago

Komayo left a reply on Renaming Column In Code?

Thank you for answers! :)

04 Sep
3 years ago

Komayo started a new conversation Renaming Column In Code?

After rename a column in a migration. Do i need to update all code at model and controllers to match the new? Manual or automatic way, whats the best?

Thank you guys.

03 Sep
3 years ago

Komayo started a new conversation ToArray() Breaks Carbon WithTimestamps()...help!

Hello guys,

Example code,

    $roles = $user->roles()->get()->toArray(); 

Result, InvalidArgumentException in Carbon.php line 414: Unexpected data found.

How can i resolve this?

Tryed already,

        public function getDates()
        {
            return array();
        }

at both models, 'user' and 'role'

Thank you.

25 Aug
3 years ago

Komayo left a reply on Input::get() Doubt Working With Select Boxes...

Any way the returned array from lists can be converted to associative directly before filling up the select box?

Komayo started a new conversation Input::get() Doubt Working With Select Boxes...

Hello,

I have this code for fill a selection box in blade.php

    $pilots = DB::table('users')->orderBy('forum_username', 'asc')->lists('forum_username');

Then in controller i use

    $forum_username = Input::get('selectfield');

Problem is it always returns the select box key and not the value, 0, 1 , 2 , 3, 4, 5.... How can i read "ben" or "john" from the box?

18 Aug
3 years ago

Komayo left a reply on Phpstorm & Autocomplete - Database Table Columns

Even my syntax is wrong, it detects it well on sublime text 3. But phpstorm cant detect it, i was dunno why...

How you mean define it?

17 Aug
3 years ago

Komayo started a new conversation Phpstorm & Autocomplete - Database Table Columns

    $foo = User::all()->get();
    $foo->username;

How can i make phpstorm understand 'username' database table column?

04 Jun
4 years ago

Komayo started a new conversation Results Of DB::Table

How can i test the results?

    DB::table('users')->where('id', $user->id)->update(['trustee' => 1]);

If affected row or not.

11 May
4 years ago

Komayo started a new conversation Update Laravel

How i update laravel from 5.0.30 to 5.1.*?

Thank you.

30 Apr
4 years ago

Komayo started a new conversation Pagination Help - Filters

Hello guys,

I have a few paginations on a project and i want the user to select the total items to view for each page, like a filter. In the view with the paginator. How can i achieve this, whats the best way to do it?

Thank you.

08 Apr
4 years ago

Komayo left a reply on Environment Issues

I already contacted them to fix the issue, hope they are quick... Trying to put application online since yesterday.

Komayo left a reply on Environment Issues

Seems putenv() function is blocked!

Komayo left a reply on Environment Issues

Yes, Database values are correct. They work fine local.

I found this at error.log

    [08-Apr-2015 12:56:21 Europe/Lisbon] PHP Warning:  putenv() has been disabled for security reasons in
    public_html/laravel_vgs/vendor/vlucas/phpdotenv/src/Dotenv.php on line 75

How can i fix this?

Komayo started a new conversation Environment Issues

This is storage\logs\laravel.log error:

    [2015-04-08 11:22:50] production.ERROR: exception 'PDOException' with message 'SQLSTATE[28000] [1045] Access denied for user 'forge'@'localhost' (using password: NO)' in /home/kgngamin/public_html/laravel_vgs/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php:47

Stack trace:

This is my .env file:

    APP_ENV=staging
    APP_DEBUG=true

    HiddenDatabaseData...

.env is on the server, but everytime i browse the website, i get that error. Also changed APP_ENV=production and tryed too APP_ENV=local... Theres no changes... Error logged is always that one, i dont know where he is getting the production and forge from.

07 Apr
4 years ago

Komayo left a reply on Environment .env

I am working on a project local, but i have it online also. Problem is when i upload, i always need to edit the configs files to make it working again, if somehow i could separate the values in .env file it was awesome

Komayo started a new conversation Environment .env

Is it possible to have 2 environments inside the same .env file?

How i separate them inside?

06 Apr
4 years ago

Komayo left a reply on Pagination In View

Fixed path issue.

Komayo left a reply on Pagination In View

Its showing the page numbers and redirecting, but url of redirection is wrong.

How can i fix it?

Also, how i integrate it with my @foreach?

Komayo started a new conversation Pagination In View

How can i use the following paginator in the blade view?

    $paginator = new Paginator($render_data, count($render_data), 5);

Iam passing the $render_data to view, and using it on a @foreach loop

Komayo left a reply on @foreach

Thank you for the answer, got it working.

Komayo started a new conversation @foreach

How can i know the index of $data? I plan to use it as a index on another related array...

    @foreach($render_data as $data)

    @foreach($pilots{$data-index] as $pilot)

Both indexes are syncronized, position 0 on $pilots its the data of position 0 in $render_data...

03 Apr
4 years ago

Komayo left a reply on Unique Validation At Update

It worked... I am getting the user 'id', via a hidden field in the form. Thank you.

    'email' => 'required|email|unique:users,email,'.Input::get('id'),

I had tryed this solution, after checking docs, but due to a empty space after "," SQL was not working...found this now. He dont likes spaces after the "," in the rule sentence...

Thank you again.

Komayo started a new conversation Unique Validation At Update

Guys,

I have this rule,

                'email' => 'required|email|unique:users',

When updating the form, filled with old values, validation always compares same value with itself, how can i validate only on new input? Iam doing that already on updating the field, but validation rules ocurrs first on the form request rules() method...so is when form is submitted....

Komayo started a new conversation Namespaces Issue With Classes...

Hello guys,

Iam using this on a controller, use Illuminate\Http\Response;

But everytime i make use of Response::make....

I need to backslash it to make it work, why? \Response::make

20 Feb
4 years ago

Komayo left a reply on Phpstorm & LiveEdit

If you guys have any trouble in sync the output files generated by gulp, i can provide my trick to resolve that issue at least in phpstorm IDE.

15 Feb
4 years ago

Komayo left a reply on Phpstorm & LiveEdit

I have that too. But not using elixir. Just Gulp directly.

12 Feb
4 years ago

Komayo left a reply on Phpstorm & LiveEdit

@domioanna did you tryed?

Komayo left a reply on Phpstorm & LiveEdit

@Ruffles do you like it?

11 Feb
4 years ago

Komayo left a reply on Phpstorm & LiveEdit

Here it is,

  • Requires: Chrome LiveReload Extension

gulpfile.js (For Laravel 5) **Laravel 4, please modify source in 'laravel-views' task.

    var gulp = require('gulp');
    var livereload = require('gulp-livereload');

    /**
     * task - 'default'
     * executes 'live-monitor'
     */
    gulp.task('default', ['live-monitor']);

    /**
     * task - 'laravel-views'
     * monitor laravel views
     */
    gulp.task('laravel-views', function() {
        gulp.src('resources/views/**/*.blade.php')
            .pipe(livereload());
    });

    /**
     * task - 'live-monitor'
     * monitors everything
     */
    gulp.task('live-monitor', function() {
        livereload.listen();
        gulp.watch('resources/views/**/*.blade.php', ['laravel-views']);
    });

just run "gulp" and make sure to not forget enable the LiveReload Chrome Extension, in the toolbar button. xD

Komayo left a reply on Laravel 5 Fresh Install. Questions + Issues

This fixes the issue:

  • {{ HTML::style('css/app.css') }} good
  • wrong

Komayo left a reply on Laravel 5 Fresh Install. Questions + Issues

@brunog iam not using vhost, i am accessing directly using the full url.

Anyway Laravel should be looking for public stuff inside the public directory. But for some reason its looking on the hosting server directory.

http://mydomain.dev directory is my hosting root. For laravels projects, url should be, http://mydomain.dev/lproject1/public/ http://mydomain.dev/lproject2/public/ This is local development and easyphp configuration "EasyPHP-DevServer-14.1VC11\data\localweb" is the root of mydomain.dev "EasyPHP-DevServer-14.1VC11\data\localweb\jininn" is the root of L5 project "EasyPHP-DevServer-14.1VC11\data\localweb\jininn\public" is the public dir of L5 project Views from L5, load assets from "EasyPHP-DevServer-14.1VC11\data\localweb"

Works on L4 installations and projects without vhost configurations, on L5, it trys to loads assets from mydomain.dev root. Is it required to setup a vhost?

@deringer thank you for your answer. mod_rewrite is setup correctly.

10 Feb
4 years ago

Komayo left a reply on Phpstorm & LiveEdit

Managed to make it working via Gulp task using gulp-livereload. Maybe it helps someone.

Komayo left a reply on Laravel 5 Fresh Install. Questions + Issues

Also can i overwrite gulpfile.JS using elixir for my own? Using only Gulp directly?

Komayo started a new conversation Laravel 5 Fresh Install. Questions + Issues

I have a fresh install of laravel 5(Everything default). After install procedure, i run the application and got the "Welcome" view. Very cool btw.

1. Issue Then i type on address bar, "home" to test the "Home" view. Now it dont loads the "css/app.css" from public directory, it trys to get it from the webserver root... Is supose to be like this by default? All assets, etc arent loaded from public anymore?

     | webserver/l5preview/public/

It always trys to load assets from webserver root.

2. Issue Using gulp for the first time and my ide is phpstorm. Managed to install it and have it run with Elixir, etc. Everytime i check gulpfile.js for tasks, it finds 5 default/tdd/watch/watch-assets/less, where can i check they source code/routines? Also the default one, is giving me a wrong --global flag. Checked the options, no --global flag set.

Thank you for the time reading and helping me.

01 Feb
4 years ago

Komayo left a reply on .htaccess + Subdirectory Issues

Thank you. :)

31 Jan
4 years ago

Komayo left a reply on .htaccess + Subdirectory Issues

Seens the issue is fixed... maybe was the server delay to handle the .htaccess....dont know.... Anyway thank you for all your time and effort to help me, and the others too.

Thank you. @bashy @wells