Skip to content

Instantly share code, notes, and snippets.

1. How would you structure a large Laravel application? Describe your approach to organizing code
beyond the default MVC structure.
2. Would you keep unused code in the codebase if you know you may need it in the future but not
sure yet?
3. Imagine the site started loading much slower than usual, what would be your first steps to debug
the issue?
4. What are some of the differences between Vue 2 and Vue 3?
* {
color:red;
background-color: blue;
}
<template>
<div class="container">
<example-article v-for="article in articles" :article="article"></example-article>
<button @click="fixArticles()">Fix Articles</button>
<button @click="pushArticle({title: 'Third Title', content: 'Content of the third article'})">Push Article</button>
</div>
</template>
<script>
@import '../../public.less';
.traders-container{
margin-bottom:50px;
.trader-container{
background: rgba(16, 11, 45, 0.7);
padding:20px;
@media (max-width: 768px) {
margin:50px 0;
<template>
<div class="catalog-root">
<div class="row">
<div class="col-lg-3 col-md-4 categories" v-if="$store.state.catalog.Game">
<div class="text-center col-lg-8 col-lg-offset-2 server-select-root-wrapper" v-if="($store.state.catalog.Game && $store.state.catalog.Game.regions)">
<server-select :regions="$store.state.catalog.Game.regions"></server-select>
</div>
@szabomikierno
szabomikierno / UserPolicy.php
Last active December 28, 2017 16:06
User resource management policy
<?php
namespace App\Infrastructure\Policies;
use App\Infrastructure\Model\User;
use App\Infrastructure\Utility\ResourcePolicy;
class UserPolicy extends ResourcePolicy
{
@szabomikierno
szabomikierno / Filter.php
Last active February 25, 2022 18:44
Filter trait for any Laravel Model
<?php
namespace App\Core\Model;
/**
* FILTER QUERY PARAMS
*
* @param (boolean) active
* The returned resources active (deleted_at) status
@szabomikierno
szabomikierno / Router.php
Created August 10, 2017 00:40
Extended Laravel Router to include custom routes
<?php
namespace App\Core\Routing;
use Illuminate\Routing\Router as LaravelRouter;
use App\Core\Routing\DisplayRegistrar;
use App\Core\Routing\ApiRegistrar;
use App\Core\Routing\PageRegistrar;
// Similar as Route::resource, I register 3 other route 'shortcuts'. Display, Api and Page.
@szabomikierno
szabomikierno / ModelLogger.php
Last active December 28, 2017 16:07
Model logger, extended by Model Observers
<?php
// A class extended by Model Observers to do some general automatic logging
// whenever a model has been touched.
namespace App\Infrastructure\Utility;
use App\Infrastructure\Model\Log;
use Auth;
@szabomikierno
szabomikierno / webpack.mix.js
Last active December 28, 2017 16:06
Webpack Mix
/**
Takes an n-depth JSON resource structure and creates a css and a js file from each leaf.
In the JSON each leaf represents a page and each leaf must have a coresponding js and
less resource file. By each page having a separate resource file I can ensure that
no unnecessary front end code will be loaded.
In addition it is very easy to have a separate json file containing only one / few pages
to always build only the pages assets that I am working on.
*/