zoukankan      html  css  js  c++  java
  • Cookie API

    Cookie API

    All cookies created by the Nova framework are encrypted and signed with an authentication code, meaning they will be considered invalid if they have been changed by the client.

    Retrieving A Cookie Value

    $value = Cookie::get('name');

    Attaching A New Cookie To A Response

    $response = Response::make('Hello World');
    
    $response->withCookie(Cookie::make('name', 'value', $minutes));

    Queueing A Cookie For The Next Response

    If you would like to set a cookie before a response has been created, use the Cookie::queue() method. The cookie will automatically be attached to the final response from your application.

    Cookie::queue($name, $value, $minutes);

    Creating A Cookie That Lasts Forever

    $cookie = Cookie::forever('name', 'value');

    Forgetting A Cookie

    Cookie::forget('name');
  • 相关阅读:
    hbase
    spark-streaming
    spark-Scala
    经典台词二
    星爷电影经典台词一
    Hadoop第一阶段总结
    测试2
    POI 表格数据导出
    GC垃圾回收机制
    Java常见的200道面试题
  • 原文地址:https://www.cnblogs.com/chunguang/p/5642972.html
Copyright © 2011-2022 走看看