Skip to content

Instantly share code, notes, and snippets.

@pantox
pantox / login.php
Last active February 27, 2019 16:59
Laravel Authentication broken down
// install a fresh copy of Laravel 5.7, make:auth and migrate the database
// head over to yoururl.test/login and hit login button
resources/views/auth/login.blade.php
11 <form method="POST" action="{{ route('login') }}">
// the named route points to /login for GET and POST
routes/web.php
@pantox
pantox / npm.lua
Created April 1, 2016 06:29
remove (<invalid_name>@<invalid_version>) from cmder promt when there is no name and version field in your package.json file
function npm_prompt_filter()
local package = io.open('package.json')
if package ~= nil then
local package_info = package:read('*a')
package:close()
local package_name = string.match(package_info, '"name"%s*:%s*"(.-)"')
or ""
local package_version = string.match(package_info, '"version"%s*:%s*"(.-)"')
or ""
{
"directory": "vendor/bower_components"
}