veve286

veve286

Member Since 3 Years Ago

yangon

Experience Points 36,655
Experience Level 8

3,345 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 16
Lessons
Completed
Best Reply Awards 62
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.

10 Jan
6 months ago

veve286 started a new conversation Production Error Tracking In Laravel

Hello guy, I want to introduce open source package to help to track ur production error.

This is called lapse.

https://github.com/pyaesone17/lapse

Laravel Self Hosted Tiny Error Tracking System With Notifications. It has a beautiful dashboard to access error via User interface. Moreover it can notify you via all of the channels from http://laravel-notification-channels.com/ ( slack, email ) etc.

It is very easy to setup and you can even customize.

20 Sep
2 years ago

veve286 started a new conversation Fake S3 Server

Does any one have experience in using fake s3 server with laravel. Because I need help , I cant able to use it.

if not , let me know how you guy test s3 server.

05 Sep
2 years ago

veve286 left a reply on Form Request Validation Class

$this->all();

29 Aug
2 years ago

veve286 left a reply on Can Scheduled Commands Have This Syntax?

          • php /path/to/artisan schedule:run >> /dev/null 2>&1

you add cron job like this ? It means output will not show in your console.

28 Aug
2 years ago

veve286 left a reply on Validate Is Not Defined..

use Illuminate\Foundation\Validation\ValidatesRequests;

Did you use this trait in your controller ?

26 Aug
2 years ago

veve286 left a reply on Laravel Passport Is Not Redirect To Authorization Page

@muragijimana It is how oauth2 works dude. For example , If you want to go to the github authorization page , you have to be authenticated right ? If not, git hub will redirect you to login page , after successful login , you will see the authorization page.

veve286 left a reply on Turn Array Of Data Back Into Model With Relationships

http://stackoverflow.com/questions/2574728/serialize-or-json-in-php

If you use json_encode , no automatic way to revert to original object.

But if you use serialize , then you may have a chance to revert it. But keep in mind that serialize is bound to PHP language.

https://laravel.com/docs/5.3/events#defining-events

Laravel use serializable trait for that case in event queue.

take a look up Illuminate\Queue\SerializesModels .

veve286 left a reply on Collection GroupBy Display Collection Name

$data = $family->members->groupBy('last_name');

foreach($data as $name => $value )

// here out $name variable

veve286 left a reply on Auth::user()

@greenroofcorp Yes it uses session .

But keep in mind that all of the laravel session is based on Symfony Session driver

it is not the same as PHP default session.

22 Jun
3 years ago

veve286 left a reply on Blade Views Are Not Showing

@Khudadad composer dump-autoload ?

21 Jun
3 years ago

veve286 left a reply on Laravel Eloquent Collection Question

$company->users(); // this is invoking query

So basically

$company->users is work the same as $company->users()->get();

But you can chain extra database query builder function

$company->users()->where('age','>',17)->take(2)->get(); // this is database where

You can also chain on $company->users->where('age','12'); // this is collection where (expensive)

14 Jun
3 years ago

veve286 left a reply on Brackets Cant Be Put As A Variable

@jekinney I am talking about compile via blade. not about php. I know it mate.

veve286 left a reply on Vue.js Or React.js, Which Should I Choose To Make Frontend?

for me putting tag in html is good . So we can easily notice which component is using. For example . . IMO React way is more messy as it use getElementById and putting js to DOM.

veve286 left a reply on Brackets Cant Be Put As A Variable

why not possible ? if it is still blade file , you can compile and passed it to js.

veve286 left a reply on Brackets Cant Be Put As A Variable

Try Putting the whole form at one time. var strFormAddNewRecord= {!! Form::open !!}} ....... {!! Form::close() !!};

veve286 left a reply on Authenticate Middleware Retrieving Wrong Auth User

To be able to work , you have to make authentication by your self.


$user = User::join('CUSTOM_TABLE','CUSTOM_TABLE.user_id','=','users.id')
            ->where('CUSTOM_COD','$request->input("user")')
            ->where('CUSTOM_TABLE.REGISTER_DELETED','')
            ->first();
$checkPassword = Hash::check($request->input("password"),$user->password);
if(checkPassword){
    Auth::login($user);
}
else{
    // no password match
}

Hopefully that will help you. It is just demo.

veve286 left a reply on Authenticate Middleware Retrieving Wrong Auth User

This won't work when checking other table value to attempt the auth. To be able to create such functionality

you have to override the EloquentUserProvider.php.

you can see that this is the code of retrieving the user by its credentials


    public function retrieveByCredentials(array $credentials)
    {
        // First we will add each credential element to the query as a where clause.
        // Then we can execute the query and, if we found a user, return it in a
        // Eloquent User "model" that will be utilized by the Guard instances.
        $query = $this->createModel()->newQuery();
    foreach ($credentials as $key => $value) {
        if (! Str::contains($key, 'password')) {
            $query->where($key, $value);
        }
    }

    return $query->first();
}

veve286 left a reply on How To Handle Htmlentities() Exception

You should show the entire index blade file not just part of the file.

I think there may be one of the line you print object like this in index file


    {{ $purchase }}

13 Jun
3 years ago

veve286 left a reply on Why I'm Getting Htmlenties() Error

can u show me your entire blade file ?

veve286 left a reply on Route::resource Creates Two Update Actions

But it is different in http verb. one of them use 'PUT' and the other use 'PATCH'. This two methods is similar but not the same. You can google it for different. 'PUT' is use when the entire value is updated and 'PATCH' is used to update part of the value.

veve286 left a reply on Why I'm Getting Htmlenties() Error

dd($purchase->usd_total) and you will see that it is object and not attribute.

09 Jun
3 years ago

veve286 left a reply on Pluging For Reports

@striker

you should send pm to the creator :D or issues at github.

veve286 left a reply on Pluging For Reports

Here you go dude. Currently i m using this plugin and I love it so much.

http://datatables.yajrabox.com/services/basic

http://datatables.yajrabox.com/service

veve286 left a reply on BRING BACK "best Answers Count On Answer Page"

@EmilMoe

The old laracast use will get it. when you ask a question, I answered. There will be best answer counts beside my avatar.

sorry for my eng

veve286 started a new conversation BRING BACK "best Rewards Count On Answer Page"

BRING BACK "best rewards count on answer page" or that can be show on profile setting.

veve286 left a reply on Trying To Get Property Of Non-object

{{ $message->email ? $message->email->name : '' }}

because some of the message doesn't have email or some of the club has email that have been deleted

veve286 left a reply on Models And Intervention Image

https://laravel.com/docs/5.2/eloquent-serialization#appending-values-to-json

how about append value approach on photo Model?


protected $appends = ['small_photo'];

public function getSmallPhotoAttribute() { return $this->attributes['small_photo'] == route('imagecache', ['small', "/".$this->id."/".$this->photo_path]); }

and then you can retrieve like this

$photo->small_photo

08 Jun
3 years ago

veve286 left a reply on Laravel 5 Image Upload To A Post

Firstly upload the image first and moved to the temp folder , after that you return file path to the view . And the view will save the path of the image using hidden input , When the user submit the form , You don't have to upload image. Just moved image from the temp folder to anywhere you want and just save the path to the database.

This is my flow.

veve286 left a reply on Validation - Other Field Has Value

'product..description' => 'required_with:product..sku',

this rule doesn't work ?

veve286 left a reply on Validation - Other Field Has Value

I think you don't have to write custom validaiton.

use 'sometimes|required_with:foo'

'sometimes' will check only input have field.

veve286 left a reply on Convert Query Output Array

$getData = json_decode(json_encode(DB::table($table) ->where($where) ->get() ), true);

$getData = (array) DB::table($table) ->where($where) ->get();

veve286 left a reply on Component Not Getting Displayed

seems you have missing div start.

veve286 left a reply on Laravel 5.2 - Relations Problems

{{ $club->region ? $club->region->name : '' }}

because some of the club doesn't have region or some of the club has region that have been deleted

27 May
3 years ago

veve286 left a reply on How To Save Array Input


$request->merge([
    'body' => json_encode($request->get('body'))
]);

or you can use mutatator in your Article model.


function setBodyAttribute($body)(){
      $this->attributes['body'] = json_encode($body);
}

23 May
3 years ago

veve286 left a reply on Queue:listen With Redis Not Working

php artisan queue:listen

That's it .It will use the driver you configured on database.php. You don't have to pass redis as argument .

veve286 left a reply on Laravel 5.2 : File Manager Service

Remove this from routes.php , and add this code after you running vendor:publish

Route::group(array('middleware' => 'auth'), function(){ Route::controller('filemanager', 'FilemanagerLaravelController'); });

veve286 left a reply on How To Concatenate String When Passing A Property To Component

If you want to pass string don't use ':' before property.

It is only for dynamic.

<section-title [email protected]{{variable + 'test'}}></section-title>

veve286 left a reply on Authorization Not Working As Expected

u defined "access-journal" and checking "access_journal"

veve286 left a reply on Authorization Not Working As Expected


return $this->members()->get()->contains($user);

or

return $this->members->contains($user);

19 May
3 years ago

veve286 left a reply on Iteration Problem...


    @if ($i % 3 == 0) 
                       
              
   @endif

keep in mind that {{ $var }} // {!! $var !!} this is the same as

veve286 left a reply on Lost Data In Custom Request Class

how about $request->merge(['token'=> $token ]);

10 May
3 years ago

veve286 left a reply on Vuejs Data Propety Is Undefine

console.log(JSON.stringify(response.data));

Check like this. Are you sure response.data contains ? 'toast ' property .

Or may be it is array.

veve286 left a reply on Tricky Table Relation

How about this ? I m not sure.


\App\SkillGroup::with(['skills.candidates' => function($query) {
            $query-> wherePivot('candidate_id',6);
 }])->get();

29 Apr
3 years ago

veve286 left a reply on Why Am I Getting "items":protected]=> Array(0)

You are getting data from collection not from database. This syntax will pull from database. siteSocialSettingsDB =socialSettings::where('socialName','=','facebook')->get();

21 Apr
3 years ago

veve286 left a reply on Update 5.1 To 5.2 AppServiceProvider Not Found

php artisan clear-compiled

06 Apr
3 years ago

veve286 left a reply on How To Call Vuex Function From Vue-router BeforeEach Callback

How about this ? if (checkUserIsLogin) { transition.next() } else { transition.abort() }