Skip to content

Commit 0e269f5

Browse files
committed
Initial commit
1 parent b7569d6 commit 0e269f5

File tree

13 files changed

+485
-0
lines changed

13 files changed

+485
-0
lines changed

.editorconfig

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
; This file is for unifying the coding style for different editors and IDEs.
2+
; More information at http://editorconfig.org
3+
4+
root = true
5+
6+
[*]
7+
charset = utf-8
8+
indent_size = 4
9+
indent_style = space
10+
end_of_line = lf
11+
insert_final_newline = true
12+
trim_trailing_whitespace = true
13+
14+
[*.md]
15+
trim_trailing_whitespace = false

.gitattributes

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Path-based git attributes
2+
# https://www.kernel.org/pub/software/scm/git/docs/gitattributes.html
3+
4+
# Ignore all test and documentation with "export-ignore".
5+
/.gitattributes export-ignore
6+
/.gitignore export-ignore
7+
/.travis.yml export-ignore
8+
/phpunit.xml.dist export-ignore
9+
/.scrutinizer.yml export-ignore
10+
/tests export-ignore
11+
/.editorconfig export-ignore
12+
/docs export-ignore

.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
build
2+
composer.lock
3+
docs
4+
vendor
5+
.idea
6+
phpcs.xml
7+
phpunit.xml
8+
.phpunit.result.cache

.scrutinizer.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
filter:
2+
excluded_paths: [tests/*, vendor/*]
3+
4+
checks:
5+
php:
6+
remove_extra_empty_lines: true
7+
remove_php_closing_tag: true
8+
remove_trailing_whitespace: true
9+
fix_use_statements:
10+
remove_unused: true
11+
preserve_multiple: false
12+
preserve_blanklines: true
13+
order_alphabetically: true
14+
fix_php_opening_tag: true
15+
fix_linefeed: true
16+
fix_line_ending: true
17+
fix_identation_4spaces: true
18+
fix_doc_comments: true

.styleci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
preset: psr12

.travis.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
language: php
2+
3+
php:
4+
- 7.2
5+
- 7.3
6+
- 7.4
7+
8+
env:
9+
matrix:
10+
- Laravel=7.x
11+
- Laravel=6.x
12+
- Laravel=5.8.x
13+
14+
install:
15+
- travis_retry composer require --dev "laravel/framework:${Laravel}" --no-interaction
16+
17+
script:
18+
- vendor/bin/phpunit

LICENSE.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) F9WebLtd <rob@f9web.co.uk>
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in
13+
all copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21+
THE SOFTWARE.

composer.json

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
{
2+
"name": "f9webltd/laravel-redirect-response-macros",
3+
"description": "Some useful redirect response macros for your Laravel application",
4+
"keywords": [
5+
"laravel",
6+
"laravel redirect",
7+
"redirect response macros",
8+
"laravel macros"
9+
],
10+
"homepage": "https://github.com/f9webltd/laravel-redirect-response-macros",
11+
"license": "MIT",
12+
"authors": [
13+
{
14+
"name": "Rob Allport",
15+
"email": "rob@f9web.co.uk",
16+
"homepage": "https://www.f9web.co.uk",
17+
"role": "Developer"
18+
}
19+
],
20+
"require": {
21+
"php": "^7.2",
22+
"laravel/framework": "5.8.* || ^6.0 || ^7.0"
23+
},
24+
"require-dev": {
25+
"orchestra/testbench": ">=3.8",
26+
"phpunit/phpunit": "^7.0|^8.0"
27+
},
28+
"autoload": {
29+
"psr-4": {
30+
"F9Web\\LaravelRedirectResponseMacros\\": "src"
31+
}
32+
},
33+
"autoload-dev": {
34+
"psr-4": {
35+
"F9Web\\LaravelRedirectResponseMacros\\Tests\\": "tests"
36+
}
37+
},
38+
"scripts": {
39+
"test": "vendor/bin/phpunit"
40+
},
41+
"config": {
42+
"sort-packages": true
43+
},
44+
"extra": {
45+
"laravel": {
46+
"providers": [
47+
"F9Web\\LaravelRedirectResponseMacros\\LaravelRedirectResponseMacrosServiceProvider"
48+
]
49+
}
50+
},
51+
"minimum-stability": "dev",
52+
"prefer-stable": true
53+
}

phpunit.xml.dist

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<phpunit bootstrap="vendor/autoload.php"
3+
backupGlobals="false"
4+
backupStaticAttributes="false"
5+
colors="true"
6+
verbose="true"
7+
convertErrorsToExceptions="true"
8+
convertNoticesToExceptions="true"
9+
convertWarningsToExceptions="true"
10+
processIsolation="false"
11+
stopOnFailure="false">
12+
<testsuites>
13+
<testsuite name="Test Suite">
14+
<directory>tests</directory>
15+
</testsuite>
16+
</testsuites>
17+
<filter>
18+
<whitelist>
19+
<directory suffix=".php">src/</directory>
20+
</whitelist>
21+
</filter>
22+
<logging>
23+
<log type="tap" target="build/report.tap"/>
24+
<log type="junit" target="build/report.junit.xml"/>
25+
<log type="coverage-html" target="build/coverage"/>
26+
<log type="coverage-text" target="build/coverage.txt"/>
27+
<log type="coverage-clover" target="build/logs/clover.xml"/>
28+
</logging>
29+
<php>
30+
<server name="APP_NAME" value="Laravel Redirect Response Macros"/>
31+
</php>
32+
</phpunit>
33+

resources/lang/en/messages.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?php
2+
3+
return [
4+
5+
'created-min' => 'The record was successfully created',
6+
'created' => 'The record was successfully created. <a href=":url" class="alert-link">View inserted record</a>.',
7+
'updated' => 'The record was successfully updated.',
8+
'deleted' => 'The record was successfully deleted.',
9+
'not-found' => 'Sorry, the record could not be found.',
10+
'authorized' => 'Welcome back, you have been securely logged in',
11+
'un-authorized' => 'You do not have permission to perform that action',
12+
13+
];

0 commit comments

Comments
 (0)