AlexanderKim

AlexanderKim

Member Since 5 Years Ago

Almaty

Experience Points
14,105
Total
Experience

895 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
52
Lessons
Completed
Best Reply Awards
2
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 3
14,105 XP
Aug
31
2 months ago
Activity icon

Replied to How To Use Docker Compose's Env Variables Inside Laravel/lumen Envs?

No, it is correct: https://docs.docker.com/compose/environment-variables/

I just tried again, lumen doesn't read variables from compose.

Activity icon

Replied to How To Use Docker Compose's Env Variables Inside Laravel/lumen Envs?

@bobbybouwmann i have these variables at container layer, but my .env (file) has no defined variables, so it cannot connect to a database.

Activity icon

Started a new Conversation How To Use Docker Compose's Env Variables Inside Laravel/lumen Envs?

If i set env variables inside compose.yml:

version: '3'
services:
  branch-api:
    restart: always
    image: "imagename"
    ports:
      - 9000:80
    container_name: "branch"
    environment:
      - "DB_CONNECTION=pgsql"
      - "DB_HOST=152.1.1.1"
      - "DB_PORT=5432"
      - "DB_DATABASE=branch"
      - "DB_USERNAME=branch"
      - "DB_PASSOWRD=branch"

How do i use compose env variables inside laravel/lumen .env file? For example:


DB_CONNECTION=env('DB_CONNECTION')

But that won't work.

Activity icon

Replied to Running Lumen Inside A Docker Container

@corbosman

Do you know, what do i need to install in order to make postgres connection work in a container, i'm using php:7.3-fpm-alpine image, here's my full Dockerfile:

FROM php:7.3-fpm-alpine

RUN apk add --update \
    && docker-php-ext-install pgsql pdo_pgsql

RUN curl -sS https://getcomposer.org/installer | php -- \
  --install-dir=/usr/bin --filename=composer

COPY . /app

RUN cd "/app" && cp .env.production .env && composer install

WORKDIR /app

EXPOSE 80

CMD php -S 0.0.0.0:80 -t public

But it doesn't connect to my pgsql instance, probably i do miss something else.

Activity icon

Replied to Running Lumen Inside A Docker Container

i see, it's just my internal API, no need for nginx/apache. What the difference between php artisan serve and php -S - it is basically the same builtin webserver?

Activity icon

Started a new Conversation Running Lumen Inside A Docker Container

I'm running Lumen instance in a docker container using this command:

CMD php -s 0.0.0.0:80 -t public

Is it ok for production API's? I just noticed, it is php development server.. i wonder, is there a php production server built-in? How do you run your Lumen's inside a docker container without a web-server? (Installing webserver is not needed in my case)

Aug
30
2 months ago
Activity icon

Replied to How To Save Current Date As Unix Timestamps In Postgres?

@resin

Schema::create('links', function (Blueprint $table) {
    $table->string('id')->primary();
    $table->string('title', 300)->nullable();
    $table->dateTime('created');
});

Not using $table->timestamps() on purpose.

Activity icon

Replied to How To Save Current Date As Unix Timestamps In Postgres?

Postgres is a bit different in this case, i've tried to save current date as Carbon::now()->timestamp, so the date would like unix timestamp 453412334123, but postgres won't save this in date, dateTime, timestamp field, throw ERROR 7 with overflow thing.

Activity icon

Started a new Conversation How To Save Current Date As Unix Timestamps In Postgres?

Now, i'm saving my date this way:

$link->created = Carbon::now();

But in postgre i'm getting '2019-08-29' kind of date, so i cannot reformat it on my frontend with hours, minutes, seconds. What's the correct way on saving current date with Carbon?

Activity icon

Replied to Is There Prettier Alternative For PHP In VScode

@janosk wait, is php inteliphense does the same work as php cs fixer? I have installed them both, but none of them does the job as prettier, for example, if i omit semicolon, then formatting a document won't put a semicolon there.

Activity icon

Started a new Conversation Is There Prettier Alternative For PHP In VScode

In VSCode there's a function "Format document", when i work on a clientside code in TS/JS - prettier works awesome, it corrects indentation, string lines, semicolons. But i cannot find something similar for PHP. Can somebody advice a good plugins, if it does exists.