방법: 1. "appHttpKernel.php" 파일의 "AppHttpMiddlewareVerifyCsrfToken" 코드를 주석 처리하여 csrf를 전역적으로 비활성화합니다. 2. "appHttpMiddlewareVerifyCsrfToken.php" 파일의 "protected $Exception" 콘텐츠를 수정하여 제외하도록 지정합니다. CSRF 확인에서 URL은 csrf를 부분적으로 끌 수 있습니다.
이 기사의 운영 환경: Windows 10 시스템, Laravel 버전 9, Dell G3 컴퓨터.
laravel 5.1에서 csrf를 끄는 방법
Laravel에는 CSRF 기능이 기본적으로 켜져 있습니다. 때로는 확인 토큰이 전달되지 않을 수 있으므로 꺼야 합니다.
방법 1(전역 종료):
파일 열기: appHttpKernel.php
이 줄 주석 처리:
'AppHttpMiddlewareVerifyCsrfToken'
방법 2(부분 종료)
수정 appHtt pMiddlewareVerifyCsrfToken.php 이 문서.
protected $Exception = []에서 CSRF 검증에서 제외할 URL을 지정하세요
예:
protected $except = [ //关掉以api开头的请求 'api/*', //关掉带有.htm的请求 '*.htm*' ];
【관련 권장 사항: laravel 비디오 튜토리얼】
위 내용은 laravel5.1에서 csrf를 끄는 방법의 상세 내용입니다. 자세한 내용은 PHP 중국어 웹사이트의 기타 관련 기사를 참조하세요!

laravelmigrationsStreamlinedatabasemanumangemanagementBeallowingschemachangestobedefinphpcode, thancanbeversion-controlledandshared. here'showtousem : 1) createMigrationClassEStodeFineOperationsLikecreatingmodifyingtables.2) USETE'PHPARTISANGUPS'COMMA

Laravel의 최신 버전을 찾으려면 공식 웹 사이트 Laravel.com을 방문하여 오른쪽 상단의 "문서"버튼을 클릭하거나 작곡가 명령 "Composershowlaravel/Framework | grepversions"를 사용할 수 있습니다. 업데이트를 유지하면 프로젝트 보안 및 성능을 향상시키는 데 도움이 될 수 있지만 기존 프로젝트에 미치는 영향을 고려해야합니다.

당신은 당신의 youshouldupdateThelateStlarViversorperferferferferferferferferferferferformanceimprovements, EnhancedSecurity, NewFeatures, BetterCommunitySupport, andlong-Termmainsupport.1) 성능 : laravel9'seloquentormoptimizationsenhanceplicationspeed.2) 보안 : Laravel8introducedBetter

youmessupamigrationinlaravel, youcan : 1) rollbacktheMigrationusing'phpartisanmigrate : rollback'sthelastone, or'phpartisanmigrate : reset'forall; 2) createeanewmigrationtocorrecterrorrorsipalladeyinproduction; 3) editthemectionfiledirectly, butthiStistly, butthiSTISTLY;

toboostperformanceInthelatestLaravelVersion, 다음에 따르면 : 1) userEdisforCachingToImProverSonTimessAndAtAbasEload.2) 최적화 된 ABASEQUERIES.3) ublicateRovingErloadtOpreduprouteresution.

LARAVEL10INTRODICESEREVERALKEYFEATERESTERETHANCEBEDEVENCENTMENT.1) LazyCollectionsallowEctiversityProcessingoflargedAgestoutSwithoutlakestougleswithoutlakeStiSwithoutloUgentswithoutloWeDAtSwithOUdlingAllRecordsIntomemory.2) The'Make : Model 및 Mightration 'and Mighting'and Mighting 'and Megigation'ArtisAncommandSimplifiesmomodelSandmagrations.3) Integration

laravelymigrations는 eTheystreamlinedevelopment, ensereconsconsencyacrossenvironments 및 simplifycollaborationanddeployment.1) theavergrammationmanagementofdatabaseSchemachanges, rowingerrors.2) MigrationsCanbeverSioncontrolled, ensurin

예, laravelmigrationisworthsing.itsimplifiesDatabaseSchemamanagemanagement, EnhanceScollaboration 및 provostversionControl.useitForstructured, 효율적인 개발.


핫 AI 도구

Undresser.AI Undress
사실적인 누드 사진을 만들기 위한 AI 기반 앱

AI Clothes Remover
사진에서 옷을 제거하는 온라인 AI 도구입니다.

Undress AI Tool
무료로 이미지를 벗다

Clothoff.io
AI 옷 제거제

Video Face Swap
완전히 무료인 AI 얼굴 교환 도구를 사용하여 모든 비디오의 얼굴을 쉽게 바꾸세요!

인기 기사

뜨거운 도구

에디트플러스 중국어 크랙 버전
작은 크기, 구문 강조, 코드 프롬프트 기능을 지원하지 않음

PhpStorm 맥 버전
최신(2018.2.1) 전문 PHP 통합 개발 도구

SublimeText3 Linux 새 버전
SublimeText3 Linux 최신 버전

WebStorm Mac 버전
유용한 JavaScript 개발 도구

ZendStudio 13.5.1 맥
강력한 PHP 통합 개발 환경