04 2020 档案

摘要:在 head 头部加入下方代码就可解决<meta name="_token" content="{{ csrf_token() }}"/> 阅读全文
posted @ 2020-04-30 22:51 武卡卡 阅读(1207) 评论(0) 推荐(1) 编辑
摘要: 阅读全文
posted @ 2020-04-30 16:38 武卡卡 阅读(255) 评论(0) 推荐(0) 编辑
摘要:一,前台模板文件 index.blade.php <!DOCTYPE html> <meta name="_token" content="{{ csrf_token() }}"/> <!-- 一定要加上这个,不然会报错 --> <script src="{{ asset('js/jquery-1. 阅读全文
posted @ 2020-04-30 10:58 武卡卡 阅读(765) 评论(0) 推荐(0) 编辑
摘要:一. 注意: 引用的静态文件要放在根目录,不要放在assets目录下 二. 引入方法 1. 模板中引入 css <link rel="stylesheet" href="{{ asset('/style.css') }}" /> 2. 模板中引入js <script src="{{ asset('/ 阅读全文
posted @ 2020-04-28 23:05 武卡卡 阅读(245) 评论(0) 推荐(0) 编辑
摘要:一,在根目录下创建一个local文件夹,把网站根目录下除了public文件夹以外所有文件及文件夹剪切到local文件夹中然后把public文件夹下的所有文件剪切到网站根目录,接着删除public文件夹,这样入口就变成根目录而不是public了,接下来 二,打开根目录下的index.php(之前/pu 阅读全文
posted @ 2020-04-28 22:03 武卡卡 阅读(520) 评论(0) 推荐(0) 编辑
摘要:<!-- 1, url --> <a href="{{url('/')}}">跳转到主页</a> <!-- 2,action 方法 --> <a href="{{action('StudentController@index')}}">跳转到用户页面</a> <!-- 3,别名 --> <a hre 阅读全文
posted @ 2020-04-27 22:23 武卡卡 阅读(573) 评论(0) 推荐(0) 编辑
摘要:<!-- 1. 模板中输出PHP变量 --> @section('footer') <div style="color:#fff"> @parent <br> {{$content}} </div> @stop <!-- 2. 模板中调用PHP代码 --> {{ date("Y-m-d",time( 阅读全文
posted @ 2020-04-27 22:04 武卡卡 阅读(711) 评论(0) 推荐(0) 编辑
摘要:1. 模板文件 <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>@ 阅读全文
posted @ 2020-04-27 21:32 武卡卡 阅读(992) 评论(0) 推荐(0) 编辑
摘要:public function ormDelete() { # 1.通过模型删除 // $student = Student::where('id',5); // $student->delete(); # 2.通过主键值删除 ## 2.1 删除单个 // Student::destroy(14); 阅读全文
posted @ 2020-04-27 20:42 武卡卡 阅读(1812) 评论(0) 推荐(0) 编辑
摘要:public function ormUpdate() { # 1.通过模型更新数据 /* $student = Student::find(14); $student->name = '小卡'; $student->save(); */ # 2.结合查询批量更新 $student = Studen 阅读全文
posted @ 2020-04-27 20:26 武卡卡 阅读(2441) 评论(0) 推荐(0) 编辑
摘要:public function ormCreate() { # 1. 使用模型新增 ->save() /* $student = new Student(); $student->name = '大圣'; $student->age = 500; $student->sex = '猴'; $stud 阅读全文
posted @ 2020-04-27 20:16 武卡卡 阅读(397) 评论(0) 推荐(0) 编辑
摘要:Laravel 的 Eloquent ORM 提供了漂亮、简洁的 ActiveRecord 实现来和数据库进行交互。每个数据库表都有一个对应的「模型」可用来跟数据表进行交互。你可以通过模型查找数据表内的数据,以及将记录添加到数据表中。 1. 模型文件 <?php namespace App; use 阅读全文
posted @ 2020-04-27 18:53 武卡卡 阅读(1332) 评论(0) 推荐(0) 编辑
摘要:public function constructorQuery() { # 1,新增 DB::table('student')->insert([ ['name' => '王者之锤', 'age' => 18], ['name' => '地狱之眼', 'age' => 30] ]); # .... 阅读全文
posted @ 2020-04-27 18:50 武卡卡 阅读(375) 评论(0) 推荐(0) 编辑
摘要:<?php namespace App\Http\Controllers; use Illuminate\Http\Request; use Illuminate\Support\Facades\DB; use App\Student; class studentController extends 阅读全文
posted @ 2020-04-27 15:25 武卡卡 阅读(151) 评论(0) 推荐(0) 编辑
摘要:/** * 用户添加 * @param 接收的表单数据 (name,password,id) * @return 返回添加是否成功 */ public function add(Request $req) { $input = $req->except(['_id']); // 排除_id } 阅读全文
posted @ 2020-04-26 12:44 武卡卡 阅读(1271) 评论(0) 推荐(0) 编辑
摘要:cd 到 laravel的目录中执行 就可以了 阅读全文
posted @ 2020-04-26 10:23 武卡卡 阅读(1719) 评论(0) 推荐(3) 编辑
摘要: 阅读全文
posted @ 2020-04-26 10:05 武卡卡 阅读(121) 评论(0) 推荐(0) 编辑
摘要:1,创建目录 ( 路径不要带有中文 ) 2,进入目录,执行下列命令 composer create-project --prefer-dist laravel/laravel project 阅读全文
posted @ 2020-04-25 20:06 武卡卡 阅读(262) 评论(0) 推荐(0) 编辑
摘要:composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/ (阿里云) 或 composer config -g repo.packagist composer https://packagist.p 阅读全文
posted @ 2020-04-25 20:05 武卡卡 阅读(944) 评论(0) 推荐(0) 编辑
摘要:对父级样式添加overflow样式 .parent{ overflow: hidden; } .child{ float:left; } 阅读全文
posted @ 2020-04-23 02:14 武卡卡 阅读(299) 评论(0) 推荐(0) 编辑
摘要:文章出处: https://www.cnblogs.com/guchengnan/p/9754149.html 在开发中,好的动画效果会让软件使用起来更有吸引力,震撼力。所以我们经常会将一些常用的代码块、功能块进行封装,为的是更好的复用。 下面这些是我在工作中积累的一些常用的开源动画库,我只是简单罗 阅读全文
posted @ 2020-04-22 11:56 武卡卡 阅读(753) 评论(0) 推荐(0) 编辑
摘要:将 头部标签的 <meta name="viewport" content="width=device-width, initial-scale=1.0" /> , 改为 <meta name="viewport" content="width=device-width" /> 即可 阅读全文
posted @ 2020-04-22 11:08 武卡卡 阅读(1618) 评论(0) 推荐(0) 编辑
摘要:img { height: 100%; object-fit: cover; } 阅读全文
posted @ 2020-04-21 15:09 武卡卡 阅读(268) 评论(0) 推荐(0) 编辑
摘要:(1) div 中内容在IE和火狐中居中问题; (2)高度的问题,div出现重叠 (3)浮动引发的问题如外围DIV无法框住内部元素; (4)IE浮动margin产生双倍距离-display:inline; (5)padding 问题,padding在FF和IE中对div实际的宽度的影响以及如何处理w 阅读全文
posted @ 2020-04-20 15:40 武卡卡 阅读(621) 评论(0) 推荐(0) 编辑
摘要:使用 z-index 前 , 需要将元素 定位设置为 position : relative . 阅读全文
posted @ 2020-04-18 16:51 武卡卡 阅读(246) 评论(0) 推荐(0) 编辑
摘要:img { width: 100%; height: 300px; object-fit: cover; object-position: top center; } 阅读全文
posted @ 2020-04-18 13:12 武卡卡 阅读(253) 评论(0) 推荐(0) 编辑
摘要:img { width: 100vw; height: 100vh; object-fit: cover; } 阅读全文
posted @ 2020-04-16 22:20 武卡卡 阅读(694) 评论(0) 推荐(0) 编辑
摘要:安装 Prettier - Code formatter prettier安装完毕,使用shift+alt+f就可格式化代码。 如果需要自动保存,要在系统设置中增加"editor.formatOnSave": true即可自动保存, 但是如果同时设置了"files.autoSave": "autoS 阅读全文
posted @ 2020-04-16 07:04 武卡卡 阅读(8702) 评论(0) 推荐(6) 编辑
摘要: 阅读全文
posted @ 2020-04-16 06:50 武卡卡 阅读(4385) 评论(0) 推荐(0) 编辑
摘要:.clearfix:after{ content:""; /*设置内容为空*/ height:0; /*高度为0*/ line-height:0; /*行高为0*/ display:block; /*将文本转为块级元素*/ visibility:hidden; /*将元素隐藏*/ clear:bot 阅读全文
posted @ 2020-04-14 21:22 武卡卡 阅读(683) 评论(0) 推荐(0) 编辑
摘要:position:absolut; left:50%; top:50%; margin-left: -(自身一半宽度); margin-top: -(自身一半高度) 阅读全文
posted @ 2020-04-14 07:10 武卡卡 阅读(327) 评论(0) 推荐(0) 编辑
摘要:$(function () { (function() { //dom加载前执行的方法 })(jQuery); })实战: 1,情景 : index.html 判断 用户是否登录,如果登录则显示主页,未登录则弹出或者跳转到登录页面(主页内容隐藏) 。2,思路 : 由于以上这个方法不会阻碍dom渲染 阅读全文
posted @ 2020-04-13 12:17 武卡卡 阅读(922) 评论(0) 推荐(0) 编辑
摘要:使用 jQuery可以有效的兼容IE 浏览器 , 但jQuery从2.0开始不兼容IE8,最低支持IE9,所以需要引入更低的jQuery版本来兼容 <script type="text/javascript" src="<%=path%>/js/jquery-3.1.1.min.js"></scri 阅读全文
posted @ 2020-04-11 23:15 武卡卡 阅读(206) 评论(0) 推荐(0) 编辑
摘要:一般我们做页面,肯定都会有设计图,移动端页面,一般情况下,UI出图都会定宽为640px,这也是移动端的标准尺寸;但是,我们也不能排除可能有其他特殊的情况可能需要做其他大小的设计图。所以,我们可以先定一个基准,然后来看看isux团队的整理出来的一个表格: 通过表格,我们能很清楚的看出各种分辨率下该如何 阅读全文
posted @ 2020-04-11 23:09 武卡卡 阅读(678) 评论(0) 推荐(1) 编辑
摘要:/* flex */ .flex{ display: flex; } .f1{ flex:1 } .flex-center{ align-items: center; justify-content: center; } .ai-center{ align-items: center; } .ai- 阅读全文
posted @ 2020-04-05 23:53 武卡卡 阅读(500) 评论(0) 推荐(0) 编辑

喜欢请打赏

扫描二维码打赏

支付宝打赏

点击右上角即可分享
微信分享提示