vue model双向绑定
摘要:view {{ $data | json }}jsnew Vue({ el: '#demo', data: { name: 'foobar' }});显示添加函数new Vue({ el: '#demo', data: { n...
阅读全文
资源
摘要:https://metricloop.com/blog/setting-up-multi-auth-in-laravel-52 http://imrealashu.in/code/laravel/multi-auth-with-laravel-5-2-2/ psr规范 http://www.php-
阅读全文
laravel ajax表格删除
摘要:view和jq @extends('layouts.main') @section('content') <h3>User List</h3> <p class="text-center text-info"></p> <table class="table table-striped"> <tr>
阅读全文
dropzone
摘要:1.引入css与js文件2.建立上传图片的路由到控制器3.视图文件form(action到上传路由)与dropzone(参数对应form的ID)选项js如下:@extends('layouts.main')@section('content') Gallery Show {{ $g->n...
阅读全文
laravel 部分路由取消csrf
摘要:// app/Http/Middleware/VerifyCsrfTokenprotected $except = [ 'webhook/*'];
阅读全文
composer autoload
摘要:1.引入autoload 文件include “vendor/autoload.php”2.自定义的单文件引入“autoload”:{ "files":["lib/OrderManager.php"]}3.目录引入,导入此目录下所有文件"classmap":["lib"]4.psr-0方式"a...
阅读全文
laravel 外键schema RBAC
摘要:$table->bigIncrements('id') ; Incrementing ID (primary key) using a " UNSIGNED BIG INTEGER" equivalent.$table->increments('id')$table->smallIncrements...
阅读全文
phpspec安装配置
摘要:安装 composer require phpspec/phpspec -dev运行 bin/phpspec在laravel中 vendor/bin/phpspec配置phpspec.ymlsuites: acme_suites: namespace: Acme //app...
阅读全文
laravel 视图组件
摘要:假设有一个文件被多个视图需要,比如导航条:1.在路由文件添加View::composer('stats', function($view){ $view->with('stats', app('App\Stats')); }可以在任意的视图文件中调用到 states2.在视图...
阅读全文
laravel 自定义函数 使用
摘要:1.创建app/helpers.php2.注册路径{ ... "autoload": { "files": [ "app/helpers.php" ] } ...}3.更新路径composer dump-autoload
阅读全文
laravel 查看SQL语句
摘要:Route::get('/test-sql', function(){ DB::enableQueryLog(); $user = App\User::first(); return DB::getQueryLog();});
阅读全文
yum install nginx
摘要:先安装nginx的yum源http://nginx.org/en/linux_packages.html#stable找到链接,安装:rpm -ivh http://nginx.org/packages/centos/6/noarch/RPMS/nginx-release-centos-6-0.el...
阅读全文
nginx 配置多个二级域名
摘要:server { server_name domain.com www.domain.com *.domain.com ; set $subdomain ''; if ...
阅读全文
apache 转 nginx .htaccess
摘要:http://www.winginx.com/en/htaccess
阅读全文
laravel md5+salt 密码
摘要:laravel 默认用的登录密码加密方式是:$password = Hash::make('password');修改密码加密方式为:$password = md5('password'.'salt');打开/vender/laravel/framework/src/illuminate/Auth,...
阅读全文
sql语句 当前时间查找重复 时间戳转换
摘要:查找重复数据select id, name, memofrom Awhere id in (select id from A group by id having count(1) >= 2)mysql 当前时间SELECT NOW(); //2015-10-27 16:43:45UNIX时间...
阅读全文
Supesite 参数说明
摘要:supesite有人看到的是强大的功能,我看到的是坑爷的一些用法,第一次看到block,我晕了。对于参数一头雾水,下面收集了一些,备用吧。supesite标签调用参数详解 参数:blocktype模块名称,系统有一下模块blocktype=category 系统分类模块blocktype=space...
阅读全文
ajax
摘要:function test(){ $.ajax({ //提交数据的类型 POST GET type:"POST", //提交的网址 url:"testLogin.aspx", //提交的数据 data:{Name:"sanmao",Pass...
阅读全文
PDO操作
摘要:1.创建实例与取结果集query("SELECTaa,bb,cc FROM foo");while ($arr = $rs->fetch()) { //...}?>2.取一个字段结果query("SELECT COUNT(*) FROM foo");$col = $rs->fetchCol...
阅读全文
laravel paginate动态分页
摘要:1.routerRoute::get('product', function(){ $products = App\Product::paginate(10); return view('product.index', compact('products'));});Route::get...
阅读全文
laravle faker
摘要:1.编辑 /database/factories/ModelFactory,添加新的类模型填充$factory->define(App\Post::class, function (Faker\Generator $faker) { return [ //会生成一个新的User,可以...
阅读全文
PHP iconv()函数转字符编码的问题(转)
摘要:PHP iconv()函数转字符编码的问题(转)载自:http://www.nowamagic.net/php/php_FunctionIconv.php在php函数库有一个函数:iconv(),iconv函数库能够完成各种字符集间的转换,是php编程中不可缺少的基础函数库。最近在做一个小偷程序,需...
阅读全文
laravel authorize(授权)
摘要:1.方法一 直接在AuthServiceProvider 中定义闭包,比较灵活namespace App\Providers;...class AuthServiceProvider extends ServiceProvider{... public function boot(GateCo...
阅读全文