Blog Spot!


Tutorial - Laravel API Development & Vue JS SPA

YouTube playlist

e01- Project Setup

  • $ laravel new jot
  • $ php artisan (help) make:auth
  • $ php artisan (help) preset
    • $ php artisan preset none - clear preset (jquery, vue & bootstrap)
    • $ php artisan preset vue - use Vue only
  • $ npm install vue-router tailwindcss --save-dev

e02 - Vue Router video

Prepare laravel to be used for SPA

Keep the auth endpoints, route everything else to AppController@index, then
in web.php do: Route::get('/{any}, 'AppController@index')->where('any', '.*')

Next in the main view of the application add <App /> Vue component, then register
it in the Vue components folder. Edit app.js and make router.js:

  • app.js:
import Vue from 'vue';
import router from './router.js';
import App from './components/App';

require('./bootstrap');

const app = new Vue({
    el: '#app',
    components: {
        App
    }
    router
});
  • router.js
import Vue from 'vue';
import VueRouter from 'vue-router';
import ExampleComponent from './components/ExampleComponent'

Vue.use(VueRouter);

export default new VueRouter({
    routes: [
        { path: '/', component: ExampleComponent }
    ]
    mode: 'history' // will turn OFF old browser support
});

Use <router-view> in the main component <App /> to display the routed components.
Important to note: the auth routes will be handled by laravel...

e03 - Tailwind CSS video

Go to tailwindcss.com - docs - installation for more information.

  • $ npm install tailwindcss --save
  • Add the needed shit to the app.scss file & do the configuration.

e04 - Login View 1 video

e05 - Login View 2 video

e06 - Login View 3 video

e07 - API Intro video

Nice introduction to TDD in Laravel with PHPUNIT e08, e09 & e10!

e08 - TDD Setup & Basic Test video

  • To set testing DB use phpunit.xml and add:
    <server name="DB_CONNECTION" value="sqlite">
    <server name="DB_DATABASE" value=":memory:">

e09 - Basic Validation video

e10 - Test Cleanup & Refactor video


Added on 11.Sep.2019
Tags: laravel spa js api tutorial youtube

Expand the Range of your Wireless Network with another Router

The wireless range offered by your Internet router will vary depending on which Wi-Fi standard it supports (802.11n routers are better than Wireless-G routers) and also the router’s physical location. You may have bought a new Wireless-N or Wireless-AC router but if there are any thick walls around, they will obstruct the Wi-Fi signal.

article

Added on 11.Aug.2019
Tags: wifi router range article

20 Laravel Eloquent Tips and Tricks

eloquent-tips-tricks

Eloquent ORM seems like a simple mechanism, but under the hood, there’s a lot of semi-hidden functions and less-known ways to achieve more with it. In this article, I will show you a few tricks.

Added on 09.Aug.2019
Tags: laravel orm eloquent sql mysql tips

A Complete Guide to Flexbox

css-tricks.com

Our comprehensive guide to CSS flexbox layout. This complete guide explains everything about flexbox, focusing on all the different possible properties for the parent element (the flex container) and the child elements (the flex items). It also includes history, demos, patterns, and a browser support chart.

Added on 06.Aug.2019
Tags: css flexbox design

Laravel, Vue and SPAs: Lazy Loading Routes

laracasts

To help improve performance, any route can be lazily-loaded by embracing Vue's async components and webpack's code-splitting feature. Don't worry: I hate confusing jargon, too. Let's break it down and review exactly when and why you might consider lazy loading certain routes in your app.

View the source code for this episode on GitHub.

Added on 05.Aug.2019
Tags: laravel js vue

Search


PHP Libraries


Carbon lib / docs
Idiorm lib / docs
Image Workshop lib / docs
lorenzos/Minixed lib / docs
Parsedown lib / docs
PHP Paginator lib / docs
PHP Redis lib / docs
QrCode lib / docs
Requests lib / docs
Slim lib / docs
Spyc lib / docs
TWIG lib / docs
Upload lib / docs
Validation lib / docs
Zebra Image lib / docs

JS Libraries


AJV lib / docs
BackboneJS lib / docs
Bootstrap Notify lib / docs
C3.js lib / docs
ChartJS lib / docs
FastMD5 lib / docs
HighlightJS lib / docs
jQuery-Storage lib / docs
JS-Cookie lib / docs
Leaflet JS lib / docs
LowDB lib / docs
Marked lib / docs
NeedlyJS lib / docs
ParcelJS lib / docs
RequireJS lib / docs
Swig lib / docs
Toastr lib / docs
Underscore lib / docs
ValidateJS lib / docs
top