veve286

veve286

Member Since 4 Years Ago

yangon

Experience Points
36,705
Total
Experience

3,295 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.

Level 8
36,705 XP
Jan
10
9 months ago
Activity icon

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.

Sep
20
3 years ago
Activity icon

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.

Sep
05
3 years ago
Activity icon

Replied to Form Request Validation Class

$this->all();

Aug
29
3 years ago
Activity icon

Replied to 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.
Aug
28
3 years ago
Activity icon

Replied to Validate Is Not Defined..

use Illuminate\Foundation\Validation\ValidatesRequests;

Did you use this trait in your controller ?

Aug
26
3 years ago
Activity icon

Replied to 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.

Activity icon

Replied to 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 .

Activity icon

Replied to Collection GroupBy Display Collection Name

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

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

// here out $name variable

Activity icon

Replied to 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.

Jun
22
3 years ago
Activity icon

Replied to Blade Views Are Not Showing

@Khudadad composer dump-autoload ?

Jun
21
3 years ago
Activity icon

Replied to 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)

Jun
14
3 years ago
Activity icon

Replied to Brackets Cant Be Put As A Variable

@jekinney I am talking about compile via blade. not about php. I know it mate. I used the words " if it is still blade file "

Activity icon

Replied to 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 .

<todo></todo>

We can easily know todo component is using without having to look up Js file. IMO React way is more messy as it use getElementById and putting js to DOM.

Activity icon

Replied to Brackets Cant Be Put As A Variable

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

Activity icon

Replied to Brackets Cant Be Put As A Variable

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

Activity icon

Replied to 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.
Activity icon

Replied to 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 of laravel


    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();
}

Activity icon

Replied to 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 }}

Jun
13
3 years ago
Activity icon

Replied to Why I'm Getting Htmlenties() Error

can u show me your entire blade file ?

Activity icon

Replied to 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 to be replaced and 'PATCH' is used to update part of the value.

Activity icon

Replied to Why I'm Getting Htmlenties() Error

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

Jun
09
3 years ago
Activity icon

Replied to Pluging For Reports

@striker

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

Activity icon

Replied to 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

Activity icon

Replied to 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

Activity icon

Started a new conversation BRING BACK "best Answers Count On Answer Page"

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

Activity icon

Replied to 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 message has email that have been deleted

Activity icon

Replied to 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

Jun
08
3 years ago
Activity icon

Replied to Laravel 5 Image Upload To A Post

Firstly upload the image first using ajax 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.

Activity icon

Replied to Validation - Other Field Has Value


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

this rule doesn't work ?
Activity icon

Replied to 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.

https://laravel.com/docs/5.2/validation#rule-required-with

https://laravel.com/docs/5.2/validation#conditionally-adding-rules

Activity icon

Replied to Convert Query Output Array

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

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

Activity icon

Replied to Component Not Getting Displayed

seems you have missing div start.

Activity icon

Replied to 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

May
27
3 years ago
Activity icon

Replied to How To Save Array Input


$request->merge([
    'body' => json_encode($request->get('body'))
]);
 $article = Auth::user()->articles()->save(new Article($request->all()));

or you can use mutatator in your Article model. It will automatically parse to json.


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

May
23
3 years ago
Activity icon

Replied to 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 .

Activity icon

Replied to 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'); });

Activity icon

Replied to 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>

Activity icon

Replied to Authorization Not Working As Expected

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

May
19
3 years ago
Activity icon

Replied to Iteration Problem...

@if ($i % 3 == 0) 
                   <div class='clear'></div>
          <?php $i++ ?>

@endif

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

Replied to Lost Data In Custom Request Class

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

May
10
3 years ago
Activity icon

Replied to 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.

Activity icon

Replied to Tricky Table Relation

How about this ? I m not sure.


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

Apr
29
3 years ago
Activity icon

Replied to 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();

Apr
21
3 years ago
Activity icon

Replied to Update 5.1 To 5.2 AppServiceProvider Not Found

php artisan clear-compiled

Apr
06
3 years ago
Activity icon

Replied to How To Call Vuex Function From Vue-router BeforeEach Callback

checkUserIsLogin();

checkUserIsLogin is function. I think you need to invoke to use it.

Apr
05
3 years ago
Activity icon

Replied to Create User From BelongsTo('User')


$c->user()->associate(factory(User::class)->make()->save())->save();

You forget to save the association. It also needed to call save( ) method to persist on db.

Apr
04
3 years ago
Activity icon

Replied to Some Trouble With ->take()

Just use join , Eagerload doesn't allowed this operation . If you limit the query on relation, it will effect on the main query too. It is not a bug , it is something we can't do with eagerload.