AlterBID...

21 May 2023

Using js async / await fetch API in Laravel Simple Example Fullcalendar(1)

Adding Event $('#add-new-event').click(function (e) { let add_event_id = add_event(event.text(val), currColor); }) Store Event to DB using js async/await fetch async function add_event(event, currColor) { try { let response = await fetch('/api/v1/events', { body: JSON.stringify({ name: event[0].innerHTML, color: currColor, _token: token }) }); const obj = await response.json(); return obj....

27 May 2023

Laravel Dependency Injection and Services Simple Example Fullcalendar (2)

Dependency injection is a design pattern that helps manage dependencies between different components of an application. It allows for better code organization, testability, and flexibility by reducing coupling between classes. In Laravel, dependency injection is primarily handled through the service container, which is an integral part of the framework. The service container is responsible for resolving and managing dependencies across your applicatio...

30 May 2023

Dockerfile Instructions

Here are some commonly used instructions in a Dockerfile: 1. FROM: Specifies the base image for your Docker image. It is typically the starting point for your Dockerfile. For example, `FROM php:7.4-fpm` selects the PHP 7.4 image with FPM (FastCGI Process Manager). 2. WORKDIR: Sets the working directory inside the container where subsequent instructions will be executed. It is recommended to use an absolute path. For example,` WORKDIR /var/www/html`...

31 May 2023

Docker-Compose for Laravel

Docker Compose is a tool that allows you to define and manage multi-container Docker applications. It uses a YAML file to configure the services, networks, and volumes for your application's containers. Docker Compose simplifies the process of running and scaling complex applications with multiple interconnected containers. Here's a basic overview of how to use Docker Compose: Install Docker Compose: Docker Compose is usually bundled with Docker fo...