This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git init | |
git add . | |
git commit -m "Initial commit" | |
# now create repo in github or elsewhere, get it's url and run below | |
git remote add origin <url_or_ssh> | |
# check | |
git remote -v |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## no composer? | |
# curl -s https://getcomposer.org/installer | php | |
# mv composer.phar ~/bin/composer | |
## no symfony? | |
# wget https://get.symfony.com/cli/installer -O - | bash | |
# echo '# KL Symfony instalation' >> ~/.bashrc | |
# echo 'export PATH="$HOME/.symfony/bin:$PATH"' >> ~/.bashrc | |
# no npm? use latest lts of node, today it's 12 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mkdir assets/js/components | |
touch assets/js/components/App.vue | |
php bin/console make:controller HomeController | |
npm run dev |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt install snapd snapd-xdg-open | |
sudo snap install phpstorm --classic | |
phpstorm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Vue from 'vue'; | |
import App from './components/App'; | |
new Vue({ | |
el: '#app', | |
render: h => h(App) | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#assets/js/components/App.vue | |
<template> | |
<div> | |
<h2 class="center">My Application</h2> | |
<div v-text="message"></div> | |
{{ message }} | |
<ul> | |
<li :key="word.id" v-for="word in words">{{ word }}</li> | |
</ul> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>{% block title %}Welcome!{% endblock %}</title> | |
{% block stylesheets %} | |
{{ encore_entry_link_tags('app') }} | |
{% endblock %} | |
</head> | |
<body> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% extends 'base.html.twig' %} | |
{% block title %}Home page{% endblock %} | |
{% block body %} | |
<div ref="words" data-words="{{ words|join(',') }}"> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Encore | |
#... | |
.enableVueLoader() | |
#... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Controller; | |
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; | |
use Symfony\Component\Routing\Annotation\Route; | |
class HomeController extends AbstractController | |
{ | |
/** |
OlderNewer