Benounnas Oussama

Member Since 1 Year Ago

Algiers

Experience Points
10,110
Total
Experience

4,890 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
89
Lessons
Completed
Best Reply Awards
1
Best Reply
Awards
  • start your 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-in-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 Created with Sketch.

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • lifer Created with Sketch.

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • evangelist 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.

  • Community Pillar

    Earned once your experience points ranks in the top 10 of all Laracasts users.

Level 3
10,110 XP
May
29
2 weeks ago
Activity icon

Replied to Storage Link Not Working On Shared Host

indeed i figure it out why the sys link didn't work, you're right!, i used to move the index.php file which was treated as the document root, i did move it again to the public folder where it belongs, repointed the websever again to the public folder (since it's was a subdomain), it worked like a charm

May
28
2 weeks ago
Activity icon

Replied to Storage Link Not Working On Shared Host

i didn't understand exactly, can you elaborate more, an example would be appreciated if you can

Activity icon

Started a new Conversation Storage Link Not Working On Shared Host

Hello, i had a client who already bought a shared hosting which i was obliged to deploy there an api of a website, i searched for solutions to run artisan commands inside the shared server. I faced a problem where i had to recreate a symbolic link for the storage, since i don't have ssh access, i used to run the artisan commands:

Route::get('/', function () {
  Artisan::call("cache:clear");
  Artisan::call("config:clear");
  Artisan::call("optimize:clear");
  Artisan::call("storage:link");
    
});

it created the sys link (screenshot) but when i visite mydomain.com/storage/image.png it throws a 404 not found error, contrary when i try mydomain.com/storage/app/public/image.png, it works normally, even when i double click on that sys link it takes me to the storage/app/public folder (like it should to be). I don't know if i gave the whole description for the problem, any idea how to fix it? thnx

Apr
25
1 month ago
Activity icon

Replied to Laravel File Storage: How To Store (decoded) Base64 Image?

the answer of @ambalavanbasith should be the best answer !!! thank you

Dec
14
5 months ago
Activity icon

Replied to Force Async Created Lifecycle Hook

well i have a Slider.vue component :

<template>
  <div>
    <div>
      <section class="rev_slider_wrapper">
        <div id="slider1" class="rev_slider" data-version="5.0">
          <ul>
            <li data-transition="fade">
              <img :src="rootImage + slider[0]" alt="" />
            </li>
          </ul>
        </div>
      </section>
    </div>
  </div>
</template>

<script>
import { mapState, mapActions } from "vuex";
export default {
  data() {
    return {
      rootImage: process.env.VUE_APP_IMAGE_URL,
    };
  },
  computed: {
    ...mapState(["slider"]),
  },
  async created() {
    await this.fetchSlider();
  },
  mounted() {
    console.log(this.slider);
  },
  methods: {
    ...mapActions(["fetchSlider"]),
  },
};
</script>

<style></style>

so i'm getting a GET http://127.0.0.1:8000/storage/undefined 404 (Not Found) because the image link is not loaded in the right moment, or am i missing something ?

Dec
13
5 months ago
Activity icon

Started a new Conversation Force Async Created Lifecycle Hook

hello, my test.vue:

<template>
  <div>
    <div v-for="data in apidata" :key="data.id">
      {{ data }}
    </div>
  </div>
</template>

<script>
import axios from "axios";
export default {
  data() {
    return {
      apidata: [],
    };
  },
  mounted() {
    console.log(this.apidata);
  },
  async created() {
    await axios.get("http://127.0.0.1:8000/apidata").then((res) => {
      this.apidata = res.data;
    });
  },
};
</script>

i'm getting empty apidata in my console in mounted() because i need to force the data to be loaded in created(), i tried beforeMount(), no data neither. the mounted lifecycle is synchronous unfortunately after i read the documentation and this github issues. Thank you in advance

Dec
08
6 months ago
Activity icon

Started a new Conversation Cors Error When Uploading File

Hello, i'm facing again the cors error when i'm trying to upload file with axios my cors.php:

<?php
return [
    'paths' => [],

    'allowed_methods' => ['*'],

    'allowed_origins' => ['http://localhost:8080'],

    'allowed_origins_patterns' => [],

    'allowed_headers' => ['*'],

    'exposed_headers' => [],

    'max_age' => 0,

    'supports_credentials' => true,
];

i have a shared file in my Services folder which gets repeated and this one works because it has no file in the request

import axios from "axios";
import store from "../store/index";

export const apiClient = axios.create({
  baseURL: `http://127.0.0.1:8001/`,
  // baseURL: "http://www.api.example.local/",

  withCredentials: true, // This is the default
  headers: {
    Accept: "application/json",

    "Content-Type": "application/json",
  },
  timeout: 10000,
});
apiClient.interceptors.request.use((config) => {
  // Get token from auth.js store
  const token = store.state.auth.token;

  if (token) {
    config.headers.common["Authorization"] = "Bearer " + token;
  }
  return config;
});

but when i'm using this one it doesn't work, it gives me the error of Access to XMLHttpRequest at 'http://127.0.0.1:8001/store-file' from origin 'http://localhost:8080' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. thank you in advance