Larasou

Larasou

Laravel Developper at Chez moi! xD

Member Since 10 Months Ago

Toulouse

Experience Points
6,260
Total
Experience

3,740 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
55
Lessons
Completed
Best Reply Awards
0
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 2
6,260 XP
Aug
28
1 month ago
Activity icon

Commented on Determine The Average Rentals Per Day

I have a database that contains over 13 million data. When I search or retrieve data, it is very slow. Is there a solution to avoid this?

Jul
30
2 months ago
Activity icon

Replied to VueRouter - Redirection To Page 404 After A Refresh Of The Page

I thank you for your answer!

I found the solution ... It's too stupid, it's just that I forgot to put the "/" at the beginning of each link ...: /

I have galley during happy hours just because of that ...

Activity icon

Started a new conversation VueRouter - Redirection To Page 404 After A Refresh Of The Page

Hello,

I have not used VueRouter for a long time.

Today I wanted to create a new application in SPA.

When I go on a page with <router-link>, the page is very good, but when I refresh this page, I get a 404 error.

I have never had that kind of problem before.

Someone would have a solution please?

/* app.js */



import Vue from 'vue';
import VueRouter from 'vue-router';
import VueHead from 'vue-head'
import routes from './routes';
import vuetify from './plugins/vuetify';

Vue.use(VueHead);
Vue.use(VueRouter);

require('./bootstrap');

/* Authentification */
Vue.component('login', require('./components/Auth/Login.vue').default);
Vue.component('register', require('./components/Auth/Register.vue').default);

const app = new Vue({
    el: '#app',
   
    router: new VueRouter(routes),
    vuetify,
});

/* routes.js */


export default {
    mode: 'history',

    linkActiveClass: 'font-bold',

    routes: [
        {
            path: '/',
            name: 'home',
            component: () => import('./components/Home'),
        },
        {
            path: 'animes',
            name: 'animes',
            component: () => import('./components/Animes/Animes'),
        },
        {
            path: 'animes-en-cours',
            name: 'animesInProgress',
            component: () => import('./components/Animes/InProgress'),
        },
        {
            path: 'animes-termines',
            name: 'animesCompleted',
            component: () => import('./components/Animes/Completed'),
        },
        {
            path: 'ma-catalogue',
            name: 'myCatalog',
            component: () => import('./components/Animes/MyCatalog'),
        },
        {
            path: 'ma-preferes',
            name: 'myFavorite',
            component: () => import('./components/Animes/MyFavorite'),
        },
        {
            path: 'top-des-classements',
            name: 'topRanking',
            component: () => import('./components/Animes/TopRanking'),
        },

        {
            path: "*",
            component: require('./views/Errors/NotFound').default,
        },
    ],
    scrollBehavior() {
        return {x: 0, y: 0}
    }
};


Jul
21
2 months ago
Activity icon

Started a new conversation Know The Percentage Of Fields Filled With A Table

Hello everyone,

I would like to create an attribute that will allow me to know the percentage of fields filled with a Model.

As seen with Laracasts with the users profile.

How can I do this simply please?

Jul
06
3 months ago
Activity icon

Started a new conversation More Than 13 Million Data

Hello people!

So here, I have a table that contains more than 13 million pieces of data and this is likely to increase over time.

When I'm doing some research or even doing any SQL query of the style:

App \ Property :: count ();

It takes about 10 seconds to get the result.

I would like to know if there is a way to optimize this? Can we do something at MYSQL level?

Here is the configuration of my PC:

➜  ✗ screenfetch

 ██████████████████  ████████     [email protected]
 ██████████████████  ████████     OS: Manjaro 18.0.4 Illyria
 ██████████████████  ████████     Kernel: x86_64 Linux 4.19.49-1-MANJARO
 ██████████████████  ████████     Uptime: 4h 56m
 ████████            ████████     Packages: 1261
 ████████  ████████  ████████     Shell: zsh 5.7.1
 ████████  ████████  ████████     Resolution: 3840x2160
 ████████  ████████  ████████     DE: Xfce4
 ████████  ████████  ████████     WM: Xfwm4
 ████████  ████████  ████████     WM Theme: Matcha-dark-sea
 ████████  ████████  ████████     GTK Theme: deepin [GTK2]
 ████████  ████████  ████████     Icon Theme: Vibrancy-NonMono-Dark-Blue-Vivid
 ████████  ████████  ████████     Font: Noto Sans 23
 ████████  ████████  ████████     CPU: AMD Ryzen 7 1700X Eight-Core @ 16x 3.4GHz
                                  GPU: GeForce GTX 1070
                                  RAM: 5991MiB / 32160MiB


Apr
05
6 months ago
Activity icon

Replied to Depreciated Method On IntelliJ And PhpStorm

Oh thank you very much! The advantage with an IDEA is that we can make changes in a few seconds :)

Activity icon

Started a new conversation Depreciated Method On IntelliJ And PhpStorm

Hello people!

It's been a few days since I noticed that my IDEA (IntillJ and PhpStorm) bar all the methods of Laravel like str_limit (), str_plurial (), array_random () etc ...

And when I fly over the mouse they tell me that the methods are deprecated.

Is this normal? There has been a change in Laravel?

Apr
04
6 months ago
Activity icon

Started a new conversation Close A Modal With The Escape Key

Good evening friends!

It's been a while that I search on the net a Vue.js directive that would allow me to close a modal when I press the key "Esc".

I tried full of directive like @ keyup.esc =" closeModalLogin ", @ keydown.esc =" closeModalLogin " etc ...

Do you have an idea ?

I'm using Tailwind CSS in my application

Apr
02
6 months ago
Activity icon

Started a new conversation Recover The Location Of People.

Hi !

I come back to you because I ask myself a very important question.

In fact I am creating a community platform, and I would like to retrieve the location of the members.

I would like to recover mainly, their country and city.

You think it would be better to create another table for me to have a "hasOne" relationship or to put everything in the "users" migration?

And to have a list of all the countries like on Laracasts, how do we do it? You have to create it by hand or there is a Laravel / Vue.js package that can do it?

I would also like to get the flag of the selected country as on Laracasts before, how can I do all this please?

NOTE: To create a profile I use directly Vue.js

Apr
01
6 months ago
Activity icon

Replied to Axios: Provisional Headers Are Shown

Ah darn! If I activated it, others did it too.

I thank you very much, I will try to find another word ;-)

Activity icon

Replied to Axios: Provisional Headers Are Shown

If I made a mistake in the roads I would have had an error code.

There he does not give me an error code.

If I remove the keyword advertisers and I create another route it works like magic and if I put it back it does not work anymore.

Mar
31
6 months ago
Activity icon

Started a new conversation Axios: Provisional Headers Are Shown

Hi people!

So I come back to you because I'm stuck with axios about the urls.

Whenever I use the keyword "advertisers" in my URLs with axios, this is always blocked. When I use another, it works.

Here's what I get each time:

Request URL: https://goworkee.dev/advertisers/projects/graphics-design/p10-et-itaque-asperiores
Referrer Policy: no-referrer-when-downgrade
Provisional headers are shown
Content-Type: multipart/form-data; boundary=----WebKitFormBoundary1IPms6MBPqNvHAvm
Origin: https://goworkee.dev
Referer: https://goworkee.dev/advertisers/projects/graphics-design/p10-et-itaque-asperiores
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.86 Safari/537.36
X-CSRF-TOKEN: P7lUiZM8ukMf1qFj30dGo4Qiqu2wR1dyRga9Lkb9
X-Requested-With: XMLHttpRequest
X-XSRF-TOKEN: eyJpdiI6ImpseXhcL0ZyTVNwdXNmU21oWUlxVERnPT0iLCJ2YWx1ZSI6ImZwSnRWd1o5dTQ1WmNabXQ4UTI3ZkJWcnpoZDl6a1JlcTJyM3FUQ0dDNGRyakt6Wm5rcG4xdTlRNFwvdzJ6XC9xQiIsIm1hYyI6Ijg2NGEyOGQxMDViYmZmNmM3NWY5YzkzNjk1YzkxNjRlMmRkMDQ0NmY0ZmNhYTY2MzI4ZmIzMDZiMDhlNGJhZDMifQ==
file: undefined
originalData: [object Object]
offer: null
duration: null
message: null
file: null
errors: [object Object]

Bug

Can you help me please ?

Activity icon

Started a new conversation Group Items In Alphabetical Order

Hello, In my application I have to group elements in alphabetical order. As in this episode:

https://laracasts.com/series/modern-css-for-backend-developers/episodes/15

I would like as in the episode to rank the elements in alphabetical order and also to recover the LETTERS.

How can I do it please?

Mar
29
6 months ago
Activity icon

Replied to Upload A Queue With Data From One Form At The Same Time.

@WILK_RANDALL - Oh yeah !

You are too form the friend! I thank you very much !!!

Activity icon

Replied to Upload A Queue With Data From One Form At The Same Time.

Ha thin that does not work. If I'm doing debugging I'll buy "undefined"

submit() {
    const formData = new FormData();
    formData.append('file', this.file);

    const data = Object.keys(this.form).forEach(key => {
        formData.append(key, this.form[key]);
    });

    console.log(data)

    // axios.post('/projets/store', data)
    //     .then(this.onSuccess)
    //     .catch(this.onFailure);
},

Unless I did wrong?

Activity icon

Started a new conversation Upload A Queue With Data From One Form At The Same Time.

Hi people,

So I'm a little stuck with axios, I can not send data from a form with a file.

If I try to do that, I have a mistake.:

selectFile(e) {
    this.file = e.target.files[0];
},

submit() {
    const formData = new FormData();
    formData.append('file', this.file);


axios.post('/projets/store', {formData, this.form})
    .then(this.onSuccess)
    .catch(this.onFailure);
},

onSuccess(response) {
    console.log(response.data)
    //window.location = response.data.redirect;
},

onFailure(error) {
    this.form.errors.record(error.response.data.errors);
},

If I only send the formDara constant, it works.

axios.post('/projets/store', formData)
    .then(this.onSuccess)
    .catch(this.onFailure);
},

the same if I send only the this.form.

He would have a solution please?

Mar
04
7 months ago
Activity icon

Started a new conversation Retrieve A Polymorphic Relationship With Vue.js

Hi people!

I just realized that I do not know how to recover a polymorphic rally by looping with Vue.js

{,…}
activities: [{id: 2, user_id: 1, subject_id: 31, subject_type: "App\Serie", type: "created_serie",…},…]
    0: {id: 2, user_id: 1, subject_id: 31, subject_type: "App\Serie", type: "created_serie",…}
    1: {id: 1, user_id: 1, subject_id: 1711, subject_type: "App\Comment", type: "created_comment",…}
         created_at: "2019-03-04 19:47:01"
         id: 1
         subject: {id: 1711, user_id: 1, commentable_id: 169, commentable_type: "App\Episode",…}
         body: "Provident corrupti voluptatum quidem placeat quidem qui. Repudiandae consequuntur harum"
         commentable_id: 169
         commentable_type: "App\Episode"
         created_at: "2019-03-04 19:47:01"
         id: 1711
         reply_id: 0
         updated_at: "2019-03-04 19:47:01"
         user: {id: 1, rank: 5, name: "Larasou", slug: "larasou", email: "[email protected]",…}
         user_id: 1
         subject_id: 1711
         subject_type: "App\Comment"
         type: "created_comment"
         updated_at: "2019-03-04 19:47:01"
         user: {id: 1, rank: 5, name: "Larasou", slug: "larasou", email: "[email protected]",…}
         user_id: 1

I can not seem to recover the relationship for commentable. With Laravel no problem but with Vue.js, I suiscoincé.

Here is my code:

Activity::where('user_id', auth()->user()->id)
            ->latest()->with(['subject'])->limit(10)->get();

I am very good at recovering belongsTo relationships with the property $with

Can you help me please ?

Feb
16
8 months ago
Activity icon

Replied to Mention A User

I mean, I do not know how to tell if a user exists before linking it.

Otherwise I would not have needed to publish my question here.

Activity icon

Replied to Mention A User

I do not know how to use the Regular Expressions.

Activity icon

Replied to Mention A User

Here is what my message looks like when published

 /**
     * Set the body attribute.
     *
     * <a href="/@param" class="font-bold text-violet">@param</a> string $body
     */
    public function setBodyAttribute($body)
    {
        $this->attributes['body'] = preg_replace(
            '/<a href="/@([^\s" class="font-bold text-violet">@([^\s</a>]+(?=(?:\.$) |\b))/',
            '<a href="/profile/" class="font-bold text-violet">LARACASTS_SNIPPET_PLACEHOLDER</a>',
            $body
        );
    }
Activity icon

Started a new conversation Mention A User

Hi people, I have a little problem, I followed the series on building a forum.

In the part where you have to mention the name of a user after an @, is problematic.

Because when I put a code on my site and that includes comments of the style:

/**
     * Set the body attribute.
     *
     * @param string $body
     */
    public function setBodyAttribute($body)
    {
        $this->attributes['body'] = preg_replace(
            '/@([^\s]+(?=(?:\.$) |\b))/',
            '<a href="/profile/" class="font-bold text-violet">LARACASTS_SNIPPET_PLACEHOLDER</a>',
            $body
        );
    }

He will also look for @param to give him a link.

Is there a way to select only users?

Jan
09
9 months ago
Activity icon

Replied to Problem With Laravel Telescope.

Ha, thank you !!! You just saved me! : D

Activity icon

Started a new conversation Problem With Laravel Telescope.

I have a problem with Laravel Telescope.

When I use phpunit, I have errors.

When I'm in production, I can not get the IDs of the data after being written to the database.

Someone would have the solution?