49 | You don't have any portals connected to this team.
50 | Add one now.
55 | This sample app only requires a single scope
56 | crm.lists.read. It cannot read your
57 | contacts and has no writing priveleges.
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
88 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Laravel HubSpot Starter Kit
2 | ### A good place to start if you're building a public App for HubSpot
3 |
4 | ##### [View the live demo](https://laravel-hubspot-starter-kit.server.joyceml.com/)
5 |
6 | ## Features
7 | - [Laravel 9.x](https://laravel.com/docs/9.x)
8 | - [Vite 3.x](https://vitejs.dev/)
9 | - [Vue 3.x](https://vuejs.org/guide/introduction.html) with Vue Router
10 | - [Pinia](https://pinia.vuejs.org/introduction.html) State Manager
11 | - [Tailwind](https://tailwindcss.com/) 3.x
12 | - [Laravel Valet](https://laravel.com/docs/9.x/valet)
13 | - [Laravel Ziggy](https://github.com/tighten/ziggy)
14 | - Integrated SPA (Utilizes Laravel API and vue 3 front-end on the same server instance)
15 | - Laravel Auth
16 | - [HubSpot OAuth2](https://developers.hubspot.com/docs/api/working-with-oauth) flow
17 | - A user can belong to many teams
18 | - A team can add many portals
19 | - Set team and portal in session to allow subsequent api calls within the app relate to chosen portal instance
20 | - Procfile included for easy deployment to [Heroku](https://www.heroku.com/)
21 |
22 | ## Requirements
23 | - [Laravel Valet](https://laravel.com/docs/9.x/valet) or [equivalent](https://www.wampserver.com/en/)
24 | - [Composer](https://getcomposer.org/)
25 | - [Node v16.13.1](https://github.com/nvm-sh/nvm) or later
26 | - [HubSpot Developer Account](https://developers.hubspot.com/)
27 |
28 | ## Laravel Installation
29 | 1. Clone or Fork this repo
30 | 2. Open terminal and cd to the working directory `cd laravel-hubspot-starter-kit`
31 | 3. run `composer install`
32 | 4. run `yarn install` or `npm install`
33 | 5. run `valet link` - To link your working directory to a `.local` or `.dev` domain (example: https://laravel-hubspot-starter-kit.dev/ is pointing to your local directory)
34 | 6. Secure your local API with `valet secure` - HubSpot apps require an SSL unless you are testing with `http://localhost`
35 | 7. At this point, if you run `yarn dev` you should be able to see your Laravel app running, but we still need to setup the database
36 | 8. Create your MySQL or MariaDB database
37 | 9. In your working directory, rename `.env.example` to `.env`
38 | 10. Enter your new database credentials in your `.env` file and save
39 | 11. While you're in the `.env` file, let's set the app URL `APP_URL=https://laravel-hubspot-starter-kit.dev`
40 | 12. Don't forget to save your `.env` file
41 | 13. Now that we have our database connected via the `.env` file, let's run the migrations with `php artisan migrate`
42 | 14. You should now be able to navigate to `https://laravel-hubspot-starter-kit.dev/register` in your browser, and register as a new user
43 |
44 | > you might see a broken SSL in the browser, that’s okay, we really needed to secure the Laravel API since HubSpot Auth callbacks require the HTTPS protocol and we are a little less worried about securing the SPA at this point.
45 |
46 | ## Creating your HubSpot App
47 | 1. Login or create a developer account at https://developers.hubspot.com/
48 | 2. Choose to create a new public APP in HubSpot developer account
49 | 3. Name your app under App Info
50 | 4. Click on the Auth tab
51 | 5. First, let’s set our redirect url - this is the url that’s going to be called in our app after the user authenticates with HubSpot `https://llaravel-hubspot-starter-kit.dev/submitauth`
52 | 
53 | 6. Next let's set some scopes... For the demo, we are going to choose to read contact lists (Make sure you have some lists created in your HubSpot client portal if you want to see some data pulled in)
54 | 7. Choose the CRM Dropdown
55 | 8. Then toggle on `crm.lists` Read
56 | 
57 | 9. When you’re done filling out the information hit Save, then we need to add our HubSpot app credentials to our `.env` file
58 | 10. Open your `.env` file again and add the following
59 | ```
60 | HS_AUTH_URL=https://app.hubspot.com/oauth/authorize
61 | HS_APP_ID=
62 | HS_CLIENT_ID=
63 | HS_CLIENT_SECRET=
64 | ```
65 | 11. Save your `.env` file
66 | 12. In your browser, login to your sample app and go to "My Hubs"
67 | 13. Click “Add Portal”
68 | 14. You should now be able to walk through the HubSpot OAuth flow
69 | 15. After you connect to your HubSpot portal, you should have been redirected to a page in your app that shows all of your HubSpot lists
70 | 
71 |
72 | ## Contributing
73 | - Fork the repo, add your feature then create a pull request
74 | - All contributions will be credited
75 |
76 |
77 |
78 |
--------------------------------------------------------------------------------
/public/images/logo-dark.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/public/images/logo-light.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/resources/js/pages/auth/Meself.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
My teams
Having many teams is perfect for agencies that want to lockdown access.
6 |
7 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
Team
23 |
24 |
25 |
26 | Name: {{ t.name }}
27 |
28 |
29 | Connected hubs: {{t.portals_count}}
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
43 |
44 |
45 |
65 |
66 |
67 | Create new team
68 |
69 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
137 |
--------------------------------------------------------------------------------
/public/build/assets/vform.es.531cc530.js:
--------------------------------------------------------------------------------
1 | import{h as m}from"./app.b5f93124.js";var j=Object.defineProperty,O=Object.prototype.hasOwnProperty,d=Object.getOwnPropertySymbols,A=Object.prototype.propertyIsEnumerable,f=(e,s,t)=>s in e?j(e,s,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[s]=t,a=(e,s)=>{for(var t in s||(s={}))O.call(s,t)&&f(e,t,s[t]);if(d)for(var t of d(s))A.call(s,t)&&f(e,t,s[t]);return e};const l=e=>e===void 0,p=e=>Array.isArray(e),y=e=>e&&typeof e.size=="number"&&typeof e.type=="string"&&typeof e.slice=="function",u=(e,s,t,o)=>((s=s||{}).indices=!l(s.indices)&&s.indices,s.nullsAsUndefineds=!l(s.nullsAsUndefineds)&&s.nullsAsUndefineds,s.booleansAsIntegers=!l(s.booleansAsIntegers)&&s.booleansAsIntegers,s.allowEmptyArrays=!l(s.allowEmptyArrays)&&s.allowEmptyArrays,t=t||new FormData,l(e)||(e===null?s.nullsAsUndefineds||t.append(o,""):(r=>typeof r=="boolean")(e)?s.booleansAsIntegers?t.append(o,e?1:0):t.append(o,e):p(e)?e.length?e.forEach((r,n)=>{const c=o+"["+(s.indices?n:"")+"]";u(r,s,t,c)}):s.allowEmptyArrays&&t.append(o+"[]",""):(r=>r instanceof Date)(e)?t.append(o,e.toISOString()):!(r=>r===Object(r))(e)||(r=>y(r)&&typeof r.name=="string"&&(typeof r.lastModifiedDate=="object"||typeof r.lastModified=="number"))(e)||y(e)?t.append(o,e):Object.keys(e).forEach(r=>{const n=e[r];if(p(n))for(;r.length>2&&r.lastIndexOf("[]")===r.length-2;)r=r.substring(0,r.length-2);u(n,s,t,o?o+"["+r+"]":r)})),t);var w={serialize:u};function h(e){if(e===null||typeof e!="object")return e;const s=Array.isArray(e)?[]:{};return Object.keys(e).forEach(t=>{s[t]=h(e[t])}),s}function b(e){return Array.isArray(e)?e:[e]}function g(e){return e instanceof File||e instanceof Blob||e instanceof FileList||typeof e=="object"&&e!==null&&Object.values(e).find(s=>g(s))!==void 0}class E{constructor(){this.errors={},this.errors={}}set(s,t){typeof s=="object"?this.errors=s:this.set(a(a({},this.errors),{[s]:b(t)}))}all(){return this.errors}has(s){return Object.prototype.hasOwnProperty.call(this.errors,s)}hasAny(...s){return s.some(t=>this.has(t))}any(){return Object.keys(this.errors).length>0}get(s){if(this.has(s))return this.getAll(s)[0]}getAll(s){return b(this.errors[s]||[])}only(...s){const t=[];return s.forEach(o=>{const r=this.get(o);r&&t.push(r)}),t}flatten(){return Object.values(this.errors).reduce((s,t)=>s.concat(t),[])}clear(s){const t={};s&&Object.keys(this.errors).forEach(o=>{o!==s&&(t[o]=this.errors[o])}),this.set(t)}}class i{constructor(s={}){this.originalData={},this.busy=!1,this.successful=!1,this.recentlySuccessful=!1,this.recentlySuccessfulTimeoutId=void 0,this.errors=new E,this.progress=void 0,this.update(s)}static make(s){return new this(s)}update(s){this.originalData=Object.assign({},this.originalData,h(s)),Object.assign(this,s)}fill(s={}){this.keys().forEach(t=>{this[t]=s[t]})}data(){return this.keys().reduce((s,t)=>a(a({},s),{[t]:this[t]}),{})}keys(){return Object.keys(this).filter(s=>!i.ignore.includes(s))}startProcessing(){this.errors.clear(),this.busy=!0,this.successful=!1,this.progress=void 0,this.recentlySuccessful=!1,clearTimeout(this.recentlySuccessfulTimeoutId)}finishProcessing(){this.busy=!1,this.successful=!0,this.progress=void 0,this.recentlySuccessful=!0,this.recentlySuccessfulTimeoutId=setTimeout(()=>{this.recentlySuccessful=!1},i.recentlySuccessfulTimeout)}clear(){this.errors.clear(),this.successful=!1,this.recentlySuccessful=!1,this.progress=void 0,clearTimeout(this.recentlySuccessfulTimeoutId)}reset(){Object.keys(this).filter(s=>!i.ignore.includes(s)).forEach(s=>{this[s]=h(this.originalData[s])})}get(s,t={}){return this.submit("get",s,t)}post(s,t={}){return this.submit("post",s,t)}patch(s,t={}){return this.submit("patch",s,t)}put(s,t={}){return this.submit("put",s,t)}delete(s,t={}){return this.submit("delete",s,t)}submit(s,t,o={}){return this.startProcessing(),o=a({data:{},params:{},url:this.route(t),method:s,onUploadProgress:this.handleUploadProgress.bind(this)},o),s.toLowerCase()==="get"?o.params=a(a({},this.data()),o.params):(o.data=a(a({},this.data()),o.data),g(o.data)&&!o.transformRequest&&(o.transformRequest=[r=>w.serialize(r)])),new Promise((r,n)=>{(i.axios||m).request(o).then(c=>{this.finishProcessing(),r(c)}).catch(c=>{this.handleErrors(c),n(c)})})}handleErrors(s){this.busy=!1,this.progress=void 0,s.response&&this.errors.set(this.extractErrors(s.response))}extractErrors(s){return s.data&&typeof s.data=="object"?s.data.errors?a({},s.data.errors):s.data.message?{error:s.data.message}:a({},s.data):{error:i.errorMessage}}handleUploadProgress(s){this.progress={total:s.total,loaded:s.loaded,percentage:Math.round(100*s.loaded/s.total)}}route(s,t={}){let o=s;return Object.prototype.hasOwnProperty.call(i.routes,s)&&(o=decodeURI(i.routes[s])),typeof t!="object"&&(t={id:t}),Object.keys(t).forEach(r=>{o=o.replace(`{${r}}`,t[r])}),o}onKeydown(s){const t=s.target;t.name&&this.errors.clear(t.name)}}i.routes={},i.errorMessage="Something went wrong. Please try again.",i.recentlySuccessfulTimeout=2e3,i.ignore=["busy","successful","errors","progress","originalData","recentlySuccessful","recentlySuccessfulTimeoutId"];export{i as g};
2 |
--------------------------------------------------------------------------------
/public/images/logo-light-teal.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/config/database.php:
--------------------------------------------------------------------------------
1 | env('DB_CONNECTION', 'mysql'),
19 |
20 | /*
21 | |--------------------------------------------------------------------------
22 | | Database Connections
23 | |--------------------------------------------------------------------------
24 | |
25 | | Here are each of the database connections setup for your application.
26 | | Of course, examples of configuring each database platform that is
27 | | supported by Laravel is shown below to make development simple.
28 | |
29 | |
30 | | All database work in Laravel is done through the PHP PDO facilities
31 | | so make sure you have the driver for your particular database of
32 | | choice installed on your machine before you begin development.
33 | |
34 | */
35 |
36 | 'connections' => [
37 |
38 | 'sqlite' => [
39 | 'driver' => 'sqlite',
40 | 'url' => env('DATABASE_URL'),
41 | 'database' => env('DB_DATABASE', database_path('database.sqlite')),
42 | 'prefix' => '',
43 | 'foreign_key_constraints' => env('DB_FOREIGN_KEYS', true),
44 | ],
45 |
46 | 'mysql' => [
47 | 'driver' => 'mysql',
48 | 'url' => env('DATABASE_URL'),
49 | 'host' => env('DB_HOST', '127.0.0.1'),
50 | 'port' => env('DB_PORT', '3306'),
51 | 'database' => env('DB_DATABASE', 'forge'),
52 | 'username' => env('DB_USERNAME', 'forge'),
53 | 'password' => env('DB_PASSWORD', ''),
54 | 'unix_socket' => env('DB_SOCKET', ''),
55 | 'charset' => 'utf8mb4',
56 | 'collation' => 'utf8mb4_unicode_ci',
57 | 'prefix' => '',
58 | 'prefix_indexes' => true,
59 | 'strict' => true,
60 | 'engine' => null,
61 | 'options' => extension_loaded('pdo_mysql') ? array_filter([
62 | PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'),
63 | ]) : [],
64 | ],
65 |
66 | 'pgsql' => [
67 | 'driver' => 'pgsql',
68 | 'url' => env('DATABASE_URL'),
69 | 'host' => env('DB_HOST', '127.0.0.1'),
70 | 'port' => env('DB_PORT', '5432'),
71 | 'database' => env('DB_DATABASE', 'forge'),
72 | 'username' => env('DB_USERNAME', 'forge'),
73 | 'password' => env('DB_PASSWORD', ''),
74 | 'charset' => 'utf8',
75 | 'prefix' => '',
76 | 'prefix_indexes' => true,
77 | 'search_path' => 'public',
78 | 'sslmode' => 'prefer',
79 | ],
80 |
81 | 'sqlsrv' => [
82 | 'driver' => 'sqlsrv',
83 | 'url' => env('DATABASE_URL'),
84 | 'host' => env('DB_HOST', 'localhost'),
85 | 'port' => env('DB_PORT', '1433'),
86 | 'database' => env('DB_DATABASE', 'forge'),
87 | 'username' => env('DB_USERNAME', 'forge'),
88 | 'password' => env('DB_PASSWORD', ''),
89 | 'charset' => 'utf8',
90 | 'prefix' => '',
91 | 'prefix_indexes' => true,
92 | // 'encrypt' => env('DB_ENCRYPT', 'yes'),
93 | // 'trust_server_certificate' => env('DB_TRUST_SERVER_CERTIFICATE', 'false'),
94 | ],
95 |
96 | ],
97 |
98 | /*
99 | |--------------------------------------------------------------------------
100 | | Migration Repository Table
101 | |--------------------------------------------------------------------------
102 | |
103 | | This table keeps track of all the migrations that have already run for
104 | | your application. Using this information, we can determine which of
105 | | the migrations on disk haven't actually been run in the database.
106 | |
107 | */
108 |
109 | 'migrations' => 'migrations',
110 |
111 | /*
112 | |--------------------------------------------------------------------------
113 | | Redis Databases
114 | |--------------------------------------------------------------------------
115 | |
116 | | Redis is an open source, fast, and advanced key-value store that also
117 | | provides a richer body of commands than a typical key-value system
118 | | such as APC or Memcached. Laravel makes it easy to dig right in.
119 | |
120 | */
121 |
122 | 'redis' => [
123 |
124 | 'client' => env('REDIS_CLIENT', 'phpredis'),
125 |
126 | 'options' => [
127 | 'cluster' => env('REDIS_CLUSTER', 'redis'),
128 | 'prefix' => env('REDIS_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_database_'),
129 | ],
130 |
131 | 'default' => [
132 | 'url' => env('REDIS_URL'),
133 | 'host' => env('REDIS_HOST', '127.0.0.1'),
134 | 'username' => env('REDIS_USERNAME'),
135 | 'password' => env('REDIS_PASSWORD'),
136 | 'port' => env('REDIS_PORT', '6379'),
137 | 'database' => env('REDIS_DB', '0'),
138 | ],
139 |
140 | 'cache' => [
141 | 'url' => env('REDIS_URL'),
142 | 'host' => env('REDIS_HOST', '127.0.0.1'),
143 | 'username' => env('REDIS_USERNAME'),
144 | 'password' => env('REDIS_PASSWORD'),
145 | 'port' => env('REDIS_PORT', '6379'),
146 | 'database' => env('REDIS_CACHE_DB', '1'),
147 | ],
148 |
149 | ],
150 |
151 | ];
152 |
--------------------------------------------------------------------------------
/public/images/abstract-1.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/config/session.php:
--------------------------------------------------------------------------------
1 | env('SESSION_DRIVER', 'file'),
22 |
23 | /*
24 | |--------------------------------------------------------------------------
25 | | Session Lifetime
26 | |--------------------------------------------------------------------------
27 | |
28 | | Here you may specify the number of minutes that you wish the session
29 | | to be allowed to remain idle before it expires. If you want them
30 | | to immediately expire on the browser closing, set that option.
31 | |
32 | */
33 |
34 | 'lifetime' => env('SESSION_LIFETIME', 120),
35 |
36 | 'expire_on_close' => false,
37 |
38 | /*
39 | |--------------------------------------------------------------------------
40 | | Session Encryption
41 | |--------------------------------------------------------------------------
42 | |
43 | | This option allows you to easily specify that all of your session data
44 | | should be encrypted before it is stored. All encryption will be run
45 | | automatically by Laravel and you can use the Session like normal.
46 | |
47 | */
48 |
49 | 'encrypt' => false,
50 |
51 | /*
52 | |--------------------------------------------------------------------------
53 | | Session File Location
54 | |--------------------------------------------------------------------------
55 | |
56 | | When using the native session driver, we need a location where session
57 | | files may be stored. A default has been set for you but a different
58 | | location may be specified. This is only needed for file sessions.
59 | |
60 | */
61 |
62 | 'files' => storage_path('framework/sessions'),
63 |
64 | /*
65 | |--------------------------------------------------------------------------
66 | | Session Database Connection
67 | |--------------------------------------------------------------------------
68 | |
69 | | When using the "database" or "redis" session drivers, you may specify a
70 | | connection that should be used to manage these sessions. This should
71 | | correspond to a connection in your database configuration options.
72 | |
73 | */
74 |
75 | 'connection' => env('SESSION_CONNECTION'),
76 |
77 | /*
78 | |--------------------------------------------------------------------------
79 | | Session Database Table
80 | |--------------------------------------------------------------------------
81 | |
82 | | When using the "database" session driver, you may specify the table we
83 | | should use to manage the sessions. Of course, a sensible default is
84 | | provided for you; however, you are free to change this as needed.
85 | |
86 | */
87 |
88 | 'table' => 'sessions',
89 |
90 | /*
91 | |--------------------------------------------------------------------------
92 | | Session Cache Store
93 | |--------------------------------------------------------------------------
94 | |
95 | | While using one of the framework's cache driven session backends you may
96 | | list a cache store that should be used for these sessions. This value
97 | | must match with one of the application's configured cache "stores".
98 | |
99 | | Affects: "apc", "dynamodb", "memcached", "redis"
100 | |
101 | */
102 |
103 | 'store' => env('SESSION_STORE'),
104 |
105 | /*
106 | |--------------------------------------------------------------------------
107 | | Session Sweeping Lottery
108 | |--------------------------------------------------------------------------
109 | |
110 | | Some session drivers must manually sweep their storage location to get
111 | | rid of old sessions from storage. Here are the chances that it will
112 | | happen on a given request. By default, the odds are 2 out of 100.
113 | |
114 | */
115 |
116 | 'lottery' => [2, 100],
117 |
118 | /*
119 | |--------------------------------------------------------------------------
120 | | Session Cookie Name
121 | |--------------------------------------------------------------------------
122 | |
123 | | Here you may change the name of the cookie used to identify a session
124 | | instance by ID. The name specified here will get used every time a
125 | | new session cookie is created by the framework for every driver.
126 | |
127 | */
128 |
129 | 'cookie' => env(
130 | 'SESSION_COOKIE',
131 | Str::slug(env('APP_NAME', 'laravel'), '_').'_session'
132 | ),
133 |
134 | /*
135 | |--------------------------------------------------------------------------
136 | | Session Cookie Path
137 | |--------------------------------------------------------------------------
138 | |
139 | | The session cookie path determines the path for which the cookie will
140 | | be regarded as available. Typically, this will be the root path of
141 | | your application but you are free to change this when necessary.
142 | |
143 | */
144 |
145 | 'path' => '/',
146 |
147 | /*
148 | |--------------------------------------------------------------------------
149 | | Session Cookie Domain
150 | |--------------------------------------------------------------------------
151 | |
152 | | Here you may change the domain of the cookie used to identify a session
153 | | in your application. This will determine which domains the cookie is
154 | | available to in your application. A sensible default has been set.
155 | |
156 | */
157 |
158 | 'domain' => env('SESSION_DOMAIN'),
159 |
160 | /*
161 | |--------------------------------------------------------------------------
162 | | HTTPS Only Cookies
163 | |--------------------------------------------------------------------------
164 | |
165 | | By setting this option to true, session cookies will only be sent back
166 | | to the server if the browser has a HTTPS connection. This will keep
167 | | the cookie from being sent to you when it can't be done securely.
168 | |
169 | */
170 |
171 | 'secure' => env('SESSION_SECURE_COOKIE'),
172 |
173 | /*
174 | |--------------------------------------------------------------------------
175 | | HTTP Access Only
176 | |--------------------------------------------------------------------------
177 | |
178 | | Setting this value to true will prevent JavaScript from accessing the
179 | | value of the cookie and the cookie will only be accessible through
180 | | the HTTP protocol. You are free to modify this option if needed.
181 | |
182 | */
183 |
184 | 'http_only' => true,
185 |
186 | /*
187 | |--------------------------------------------------------------------------
188 | | Same-Site Cookies
189 | |--------------------------------------------------------------------------
190 | |
191 | | This option determines how your cookies behave when cross-site requests
192 | | take place, and can be used to mitigate CSRF attacks. By default, we
193 | | will set this value to "lax" since this is a secure default value.
194 | |
195 | | Supported: "lax", "strict", "none", null
196 | |
197 | */
198 |
199 | 'same_site' => 'lax',
200 |
201 | ];
202 |
--------------------------------------------------------------------------------
/config/app.php:
--------------------------------------------------------------------------------
1 | env('APP_NAME', 'Laravel'),
19 |
20 | /*
21 | |--------------------------------------------------------------------------
22 | | Application Environment
23 | |--------------------------------------------------------------------------
24 | |
25 | | This value determines the "environment" your application is currently
26 | | running in. This may determine how you prefer to configure various
27 | | services the application utilizes. Set this in your ".env" file.
28 | |
29 | */
30 |
31 | 'env' => env('APP_ENV', 'production'),
32 |
33 | /*
34 | |--------------------------------------------------------------------------
35 | | Application Debug Mode
36 | |--------------------------------------------------------------------------
37 | |
38 | | When your application is in debug mode, detailed error messages with
39 | | stack traces will be shown on every error that occurs within your
40 | | application. If disabled, a simple generic error page is shown.
41 | |
42 | */
43 |
44 | 'debug' => (bool) env('APP_DEBUG', false),
45 |
46 | /*
47 | |--------------------------------------------------------------------------
48 | | Application URL
49 | |--------------------------------------------------------------------------
50 | |
51 | | This URL is used by the console to properly generate URLs when using
52 | | the Artisan command line tool. You should set this to the root of
53 | | your application so that it is used when running Artisan tasks.
54 | |
55 | */
56 |
57 | 'url' => env('APP_URL', 'http://localhost'),
58 |
59 | 'asset_url' => env('ASSET_URL'),
60 |
61 | /*
62 | |--------------------------------------------------------------------------
63 | | Application Timezone
64 | |--------------------------------------------------------------------------
65 | |
66 | | Here you may specify the default timezone for your application, which
67 | | will be used by the PHP date and date-time functions. We have gone
68 | | ahead and set this to a sensible default for you out of the box.
69 | |
70 | */
71 |
72 | 'timezone' => 'UTC',
73 |
74 | /*
75 | |--------------------------------------------------------------------------
76 | | Application Locale Configuration
77 | |--------------------------------------------------------------------------
78 | |
79 | | The application locale determines the default locale that will be used
80 | | by the translation service provider. You are free to set this value
81 | | to any of the locales which will be supported by the application.
82 | |
83 | */
84 |
85 | 'locale' => 'en',
86 |
87 | /*
88 | |--------------------------------------------------------------------------
89 | | Application Fallback Locale
90 | |--------------------------------------------------------------------------
91 | |
92 | | The fallback locale determines the locale to use when the current one
93 | | is not available. You may change the value to correspond to any of
94 | | the language folders that are provided through your application.
95 | |
96 | */
97 |
98 | 'fallback_locale' => 'en',
99 |
100 | /*
101 | |--------------------------------------------------------------------------
102 | | Faker Locale
103 | |--------------------------------------------------------------------------
104 | |
105 | | This locale will be used by the Faker PHP library when generating fake
106 | | data for your database seeds. For example, this will be used to get
107 | | localized telephone numbers, street address information and more.
108 | |
109 | */
110 |
111 | 'faker_locale' => 'en_US',
112 |
113 | /*
114 | |--------------------------------------------------------------------------
115 | | Encryption Key
116 | |--------------------------------------------------------------------------
117 | |
118 | | This key is used by the Illuminate encrypter service and should be set
119 | | to a random, 32 character string, otherwise these encrypted strings
120 | | will not be safe. Please do this before deploying an application!
121 | |
122 | */
123 |
124 | 'key' => env('APP_KEY'),
125 |
126 | 'cipher' => 'AES-256-CBC',
127 |
128 | /*
129 | |--------------------------------------------------------------------------
130 | | Maintenance Mode Driver
131 | |--------------------------------------------------------------------------
132 | |
133 | | These configuration options determine the driver used to determine and
134 | | manage Laravel's "maintenance mode" status. The "cache" driver will
135 | | allow maintenance mode to be controlled across multiple machines.
136 | |
137 | | Supported drivers: "file", "cache"
138 | |
139 | */
140 |
141 | 'maintenance' => [
142 | 'driver' => 'file',
143 | // 'store' => 'redis',
144 | ],
145 |
146 | /*
147 | |--------------------------------------------------------------------------
148 | | Autoloaded Service Providers
149 | |--------------------------------------------------------------------------
150 | |
151 | | The service providers listed here will be automatically loaded on the
152 | | request to your application. Feel free to add your own services to
153 | | this array to grant expanded functionality to your applications.
154 | |
155 | */
156 |
157 | 'providers' => [
158 |
159 | /*
160 | * Laravel Framework Service Providers...
161 | */
162 | Illuminate\Auth\AuthServiceProvider::class,
163 | Illuminate\Broadcasting\BroadcastServiceProvider::class,
164 | Illuminate\Bus\BusServiceProvider::class,
165 | Illuminate\Cache\CacheServiceProvider::class,
166 | Illuminate\Foundation\Providers\ConsoleSupportServiceProvider::class,
167 | Illuminate\Cookie\CookieServiceProvider::class,
168 | Illuminate\Database\DatabaseServiceProvider::class,
169 | Illuminate\Encryption\EncryptionServiceProvider::class,
170 | Illuminate\Filesystem\FilesystemServiceProvider::class,
171 | Illuminate\Foundation\Providers\FoundationServiceProvider::class,
172 | Illuminate\Hashing\HashServiceProvider::class,
173 | Illuminate\Mail\MailServiceProvider::class,
174 | Illuminate\Notifications\NotificationServiceProvider::class,
175 | Illuminate\Pagination\PaginationServiceProvider::class,
176 | Illuminate\Pipeline\PipelineServiceProvider::class,
177 | Illuminate\Queue\QueueServiceProvider::class,
178 | Illuminate\Redis\RedisServiceProvider::class,
179 | Illuminate\Auth\Passwords\PasswordResetServiceProvider::class,
180 | Illuminate\Session\SessionServiceProvider::class,
181 | Illuminate\Translation\TranslationServiceProvider::class,
182 | Illuminate\Validation\ValidationServiceProvider::class,
183 | Illuminate\View\ViewServiceProvider::class,
184 |
185 | /*
186 | * Package Service Providers...
187 | */
188 |
189 | /*
190 | * Application Service Providers...
191 | */
192 | App\Providers\AppServiceProvider::class,
193 | App\Providers\AuthServiceProvider::class,
194 | // App\Providers\BroadcastServiceProvider::class,
195 | App\Providers\EventServiceProvider::class,
196 | App\Providers\RouteServiceProvider::class,
197 |
198 | ],
199 |
200 | /*
201 | |--------------------------------------------------------------------------
202 | | Class Aliases
203 | |--------------------------------------------------------------------------
204 | |
205 | | This array of class aliases will be registered when this application
206 | | is started. However, feel free to register as many as you wish as
207 | | the aliases are "lazy" loaded so they don't hinder performance.
208 | |
209 | */
210 |
211 | 'aliases' => Facade::defaultAliases()->merge([
212 | // 'ExampleClass' => App\Example\ExampleClass::class,
213 | ])->toArray(),
214 |
215 | ];
216 |
--------------------------------------------------------------------------------
/lang/en/validation.php:
--------------------------------------------------------------------------------
1 | 'The :attribute must be accepted.',
17 | 'accepted_if' => 'The :attribute must be accepted when :other is :value.',
18 | 'active_url' => 'The :attribute is not a valid URL.',
19 | 'after' => 'The :attribute must be a date after :date.',
20 | 'after_or_equal' => 'The :attribute must be a date after or equal to :date.',
21 | 'alpha' => 'The :attribute must only contain letters.',
22 | 'alpha_dash' => 'The :attribute must only contain letters, numbers, dashes and underscores.',
23 | 'alpha_num' => 'The :attribute must only contain letters and numbers.',
24 | 'array' => 'The :attribute must be an array.',
25 | 'before' => 'The :attribute must be a date before :date.',
26 | 'before_or_equal' => 'The :attribute must be a date before or equal to :date.',
27 | 'between' => [
28 | 'array' => 'The :attribute must have between :min and :max items.',
29 | 'file' => 'The :attribute must be between :min and :max kilobytes.',
30 | 'numeric' => 'The :attribute must be between :min and :max.',
31 | 'string' => 'The :attribute must be between :min and :max characters.',
32 | ],
33 | 'boolean' => 'The :attribute field must be true or false.',
34 | 'confirmed' => 'The :attribute confirmation does not match.',
35 | 'current_password' => 'The password is incorrect.',
36 | 'date' => 'The :attribute is not a valid date.',
37 | 'date_equals' => 'The :attribute must be a date equal to :date.',
38 | 'date_format' => 'The :attribute does not match the format :format.',
39 | 'declined' => 'The :attribute must be declined.',
40 | 'declined_if' => 'The :attribute must be declined when :other is :value.',
41 | 'different' => 'The :attribute and :other must be different.',
42 | 'digits' => 'The :attribute must be :digits digits.',
43 | 'digits_between' => 'The :attribute must be between :min and :max digits.',
44 | 'dimensions' => 'The :attribute has invalid image dimensions.',
45 | 'distinct' => 'The :attribute field has a duplicate value.',
46 | 'doesnt_end_with' => 'The :attribute may not end with one of the following: :values.',
47 | 'doesnt_start_with' => 'The :attribute may not start with one of the following: :values.',
48 | 'email' => 'The :attribute must be a valid email address.',
49 | 'ends_with' => 'The :attribute must end with one of the following: :values.',
50 | 'enum' => 'The selected :attribute is invalid.',
51 | 'exists' => 'The selected :attribute is invalid.',
52 | 'file' => 'The :attribute must be a file.',
53 | 'filled' => 'The :attribute field must have a value.',
54 | 'gt' => [
55 | 'array' => 'The :attribute must have more than :value items.',
56 | 'file' => 'The :attribute must be greater than :value kilobytes.',
57 | 'numeric' => 'The :attribute must be greater than :value.',
58 | 'string' => 'The :attribute must be greater than :value characters.',
59 | ],
60 | 'gte' => [
61 | 'array' => 'The :attribute must have :value items or more.',
62 | 'file' => 'The :attribute must be greater than or equal to :value kilobytes.',
63 | 'numeric' => 'The :attribute must be greater than or equal to :value.',
64 | 'string' => 'The :attribute must be greater than or equal to :value characters.',
65 | ],
66 | 'image' => 'The :attribute must be an image.',
67 | 'in' => 'The selected :attribute is invalid.',
68 | 'in_array' => 'The :attribute field does not exist in :other.',
69 | 'integer' => 'The :attribute must be an integer.',
70 | 'ip' => 'The :attribute must be a valid IP address.',
71 | 'ipv4' => 'The :attribute must be a valid IPv4 address.',
72 | 'ipv6' => 'The :attribute must be a valid IPv6 address.',
73 | 'json' => 'The :attribute must be a valid JSON string.',
74 | 'lt' => [
75 | 'array' => 'The :attribute must have less than :value items.',
76 | 'file' => 'The :attribute must be less than :value kilobytes.',
77 | 'numeric' => 'The :attribute must be less than :value.',
78 | 'string' => 'The :attribute must be less than :value characters.',
79 | ],
80 | 'lte' => [
81 | 'array' => 'The :attribute must not have more than :value items.',
82 | 'file' => 'The :attribute must be less than or equal to :value kilobytes.',
83 | 'numeric' => 'The :attribute must be less than or equal to :value.',
84 | 'string' => 'The :attribute must be less than or equal to :value characters.',
85 | ],
86 | 'mac_address' => 'The :attribute must be a valid MAC address.',
87 | 'max' => [
88 | 'array' => 'The :attribute must not have more than :max items.',
89 | 'file' => 'The :attribute must not be greater than :max kilobytes.',
90 | 'numeric' => 'The :attribute must not be greater than :max.',
91 | 'string' => 'The :attribute must not be greater than :max characters.',
92 | ],
93 | 'max_digits' => 'The :attribute must not have more than :max digits.',
94 | 'mimes' => 'The :attribute must be a file of type: :values.',
95 | 'mimetypes' => 'The :attribute must be a file of type: :values.',
96 | 'min' => [
97 | 'array' => 'The :attribute must have at least :min items.',
98 | 'file' => 'The :attribute must be at least :min kilobytes.',
99 | 'numeric' => 'The :attribute must be at least :min.',
100 | 'string' => 'The :attribute must be at least :min characters.',
101 | ],
102 | 'min_digits' => 'The :attribute must have at least :min digits.',
103 | 'multiple_of' => 'The :attribute must be a multiple of :value.',
104 | 'not_in' => 'The selected :attribute is invalid.',
105 | 'not_regex' => 'The :attribute format is invalid.',
106 | 'numeric' => 'The :attribute must be a number.',
107 | 'password' => [
108 | 'letters' => 'The :attribute must contain at least one letter.',
109 | 'mixed' => 'The :attribute must contain at least one uppercase and one lowercase letter.',
110 | 'numbers' => 'The :attribute must contain at least one number.',
111 | 'symbols' => 'The :attribute must contain at least one symbol.',
112 | 'uncompromised' => 'The given :attribute has appeared in a data leak. Please choose a different :attribute.',
113 | ],
114 | 'present' => 'The :attribute field must be present.',
115 | 'prohibited' => 'The :attribute field is prohibited.',
116 | 'prohibited_if' => 'The :attribute field is prohibited when :other is :value.',
117 | 'prohibited_unless' => 'The :attribute field is prohibited unless :other is in :values.',
118 | 'prohibits' => 'The :attribute field prohibits :other from being present.',
119 | 'regex' => 'The :attribute format is invalid.',
120 | 'required' => 'The :attribute field is required.',
121 | 'required_array_keys' => 'The :attribute field must contain entries for: :values.',
122 | 'required_if' => 'The :attribute field is required when :other is :value.',
123 | 'required_if_accepted' => 'The :attribute field is required when :other is accepted.',
124 | 'required_unless' => 'The :attribute field is required unless :other is in :values.',
125 | 'required_with' => 'The :attribute field is required when :values is present.',
126 | 'required_with_all' => 'The :attribute field is required when :values are present.',
127 | 'required_without' => 'The :attribute field is required when :values is not present.',
128 | 'required_without_all' => 'The :attribute field is required when none of :values are present.',
129 | 'same' => 'The :attribute and :other must match.',
130 | 'size' => [
131 | 'array' => 'The :attribute must contain :size items.',
132 | 'file' => 'The :attribute must be :size kilobytes.',
133 | 'numeric' => 'The :attribute must be :size.',
134 | 'string' => 'The :attribute must be :size characters.',
135 | ],
136 | 'starts_with' => 'The :attribute must start with one of the following: :values.',
137 | 'string' => 'The :attribute must be a string.',
138 | 'timezone' => 'The :attribute must be a valid timezone.',
139 | 'unique' => 'The :attribute has already been taken.',
140 | 'uploaded' => 'The :attribute failed to upload.',
141 | 'url' => 'The :attribute must be a valid URL.',
142 | 'uuid' => 'The :attribute must be a valid UUID.',
143 |
144 | /*
145 | |--------------------------------------------------------------------------
146 | | Custom Validation Language Lines
147 | |--------------------------------------------------------------------------
148 | |
149 | | Here you may specify custom validation messages for attributes using the
150 | | convention "attribute.rule" to name the lines. This makes it quick to
151 | | specify a specific custom language line for a given attribute rule.
152 | |
153 | */
154 |
155 | 'custom' => [
156 | 'attribute-name' => [
157 | 'rule-name' => 'custom-message',
158 | ],
159 | ],
160 |
161 | /*
162 | |--------------------------------------------------------------------------
163 | | Custom Validation Attributes
164 | |--------------------------------------------------------------------------
165 | |
166 | | The following language lines are used to swap our attribute placeholder
167 | | with something more reader friendly such as "E-Mail Address" instead
168 | | of "email". This simply helps us make our message more expressive.
169 | |
170 | */
171 |
172 | 'attributes' => [],
173 |
174 | ];
175 |
--------------------------------------------------------------------------------