Return to homepage
01/41. Introduction

Comments

Min

what is your mysql client ?Please tell me

  • 0
Joby

For new Laravel 8 users: Install the Auth by running: composer require laravel/ui , then: php artisan ui vue --auth (pick vue, bootstrap, or react) , then: npm install, then: npm run dev.

  • 3
Rick

I'm getting this error: Stripe\Exception\InvalidRequestException No such PaymentMethod: 'tok_1HQAsALHwXoYBzwItQ57dAyP'

  • 0
Justin

Great course. I wish if you would've updated the course to latest Laravel. for eg: account verification on register is baked in to the framework now.

  • 2
Oscar

I am stucked in video 16. How can I add products to stripe? Must it be manually? from the seeder? Thx for help

  • 0
Jovani

I Need some help I kept getting this error when I tried to submit the form

No such PaymentMethod: tok_1Gan8QKqFOod3EZDOAloJIPY

and this is the log From stripe

Request POST body { "product": "prod_H95HWcsC9h5My3", "currency": "usd", "interval": "month", "interval_count": "1", "usage_type": "licensed", "billing_scheme": "per_unit", "nickname": "Monthly", "id": "monthly_6", "amount_decimal": "1000" }

Response body { "id": "monthly_6", "object": "plan", "active": true, "aggregate_usage": null, "amount": 1000, "amount_decimal": "1000", "billing_scheme": "per_unit", "created": 1587579394, "currency": "usd", "interval": "month", "interval_count": 1, "livemode": false, "metadata": { }, "name": "Monthly", "nickname": "Monthly", "owning_merchant": "acct_1Eg1PRKqFOod3EZD", "owning_merchant_info": "acct_1Eg1PRKqFOod3EZD", "product": "prod_H95HWcsC9h5My3", "tiers": null, "tiers_mode": null, "transform_usage": null, "trial_period_days": null, "usage_type": "licensed" }

  • 0
Girish

Is there a notifications/ Announcements module in this or any other course.

  • 0
Joshua

Countries Database Migration:

Please note: this includes an additional 'iso' column for potentially displaying a flag icon using the following package: https://github.com/lipis/flag-icon-css

1
2$countries = [
3 ['iso' => 'AF','name' => 'Afghanistan','dialing_code' => '93'],
4 ['iso' => 'AL','name' => 'Albania','dialing_code' => '355'],
5 ['iso' => 'DZ','name' => 'Algeria','dialing_code' => '213'],
6 ['iso' => 'AS','name' => 'American Samoa','dialing_code' => '1684'],
7 ['iso' => 'AD','name' => 'Andorra','dialing_code' => '376'],
8 ['iso' => 'AO','name' => 'Angola','dialing_code' => '244'],
9 ['iso' => 'AI','name' => 'Anguilla','dialing_code' => '1264'],
10 ['iso' => 'AQ','name' => 'Antarctica','dialing_code' => '0'],
11 ['iso' => 'AG','name' => 'Antigua and Barbuda','dialing_code' => '1268'],
12 ['iso' => 'AR','name' => 'Argentina','dialing_code' => '54'],
13 ['iso' => 'AM','name' => 'Armenia','dialing_code' => '374'],
14 ['iso' => 'AW','name' => 'Aruba','dialing_code' => '297'],
15 ['iso' => 'AU','name' => 'Australia','dialing_code' => '61'],
16 ['iso' => 'AT','name' => 'Austria','dialing_code' => '43'],
17 ['iso' => 'AZ','name' => 'Azerbaijan','dialing_code' => '994'],
18 ['iso' => 'BS','name' => 'Bahamas','dialing_code' => '1242'],
19 ['iso' => 'BH','name' => 'Bahrain','dialing_code' => '973'],
20 ['iso' => 'BD','name' => 'Bangladesh','dialing_code' => '880'],
21 ['iso' => 'BB','name' => 'Barbados','dialing_code' => '1246'],
22 ['iso' => 'BY','name' => 'Belarus','dialing_code' => '375'],
23 ['iso' => 'BE','name' => 'Belgium','dialing_code' => '32'],
24 ['iso' => 'BZ','name' => 'Belize','dialing_code' => '501'],
25 ['iso' => 'BJ','name' => 'Benin','dialing_code' => '229'],
26 ['iso' => 'BM','name' => 'Bermuda','dialing_code' => '1441'],
27 ['iso' => 'BT','name' => 'Bhutan','dialing_code' => '975'],
28 ['iso' => 'BO','name' => 'Bolivia','dialing_code' => '591'],
29 ['iso' => 'BA','name' => 'Bosnia and Herzegovina','dialing_code' => '387'],
30 ['iso' => 'BW','name' => 'Botswana','dialing_code' => '267'],
31 ['iso' => 'BV','name' => 'Bouvet Island','dialing_code' => '0'],
32 ['iso' => 'BR','name' => 'Brazil','dialing_code' => '55'],
33 ['iso' => 'IO','name' => 'British Indian Ocean Territory','dialing_code' => '246'],
34 ['iso' => 'BN','name' => 'Brunei Darussalam','dialing_code' => '673'],
35 ['iso' => 'BG','name' => 'Bulgaria','dialing_code' => '359'],
36 ['iso' => 'BF','name' => 'Burkina Faso','dialing_code' => '226'],
37 ['iso' => 'BI','name' => 'Burundi','dialing_code' => '257'],
38 ['iso' => 'KH','name' => 'Cambodia','dialing_code' => '855'],
39 ['iso' => 'CM','name' => 'Cameroon','dialing_code' => '237'],
40 ['iso' => 'CA','name' => 'Canada','dialing_code' => '1'],
41 ['iso' => 'CV','name' => 'Cape Verde','dialing_code' => '238'],
42 ['iso' => 'KY','name' => 'Cayman Islands','dialing_code' => '1345'],
43 ['iso' => 'CF','name' => 'Central African Republic','dialing_code' => '236'],
44 ['iso' => 'TD','name' => 'Chad','dialing_code' => '235'],
45 ['iso' => 'CL','name' => 'Chile','dialing_code' => '56'],
46 ['iso' => 'CN','name' => 'China','dialing_code' => '86'],
47 ['iso' => 'CX','name' => 'Christmas Island','dialing_code' => '61'],
48 ['iso' => 'CC','name' => 'Cocos (Keeling) Islands','dialing_code' => '672'],
49 ['iso' => 'CO','name' => 'Colombia','dialing_code' => '57'],
50 ['iso' => 'KM','name' => 'Comoros','dialing_code' => '269'],
51 ['iso' => 'CG','name' => 'Congo','dialing_code' => '242'],
52 ['iso' => 'CD','name' => 'Congo, the Democratic Republic of the','dialing_code' => '242'],
53 ['iso' => 'CK','name' => 'Cook Islands','dialing_code' => '682'],
54 ['iso' => 'CR','name' => 'Costa Rica','dialing_code' => '506'],
55 ['iso' => 'CI','name' => 'Cote D\'Ivoire','dialing_code' => '225'],
56 ['iso' => 'HR','name' => 'Croatia','dialing_code' => '385'],
57 ['iso' => 'CU','name' => 'Cuba','dialing_code' => '53'],
58 ['iso' => 'CY','name' => 'Cyprus','dialing_code' => '357'],
59 ['iso' => 'CZ','name' => 'Czech Republic','dialing_code' => '420'],
60 ['iso' => 'DK','name' => 'Denmark','dialing_code' => '45'],
61 ['iso' => 'DJ','name' => 'Djibouti','dialing_code' => '253'],
62 ['iso' => 'DM','name' => 'Dominica','dialing_code' => '1767'],
63 ['iso' => 'DO','name' => 'Dominican Republic','dialing_code' => '1809'],
64 ['iso' => 'EC','name' => 'Ecuador','dialing_code' => '593'],
65 ['iso' => 'EG','name' => 'Egypt','dialing_code' => '20'],
66 ['iso' => 'SV','name' => 'El Salvador','dialing_code' => '503'],
67 ['iso' => 'GQ','name' => 'Equatorial Guinea','dialing_code' => '240'],
68 ['iso' => 'ER','name' => 'Eritrea','dialing_code' => '291'],
69 ['iso' => 'EE','name' => 'Estonia','dialing_code' => '372'],
70 ['iso' => 'ET','name' => 'Ethiopia','dialing_code' => '251'],
71 ['iso' => 'FK','name' => 'Falkland Islands (Malvinas)','dialing_code' => '500'],
72 ['iso' => 'FO','name' => 'Faroe Islands','dialing_code' => '298'],
73 ['iso' => 'FJ','name' => 'Fiji','dialing_code' => '679'],
74 ['iso' => 'FI','name' => 'Finland','dialing_code' => '358'],
75 ['iso' => 'FR','name' => 'France','dialing_code' => '33'],
76 ['iso' => 'GF','name' => 'French Guiana','dialing_code' => '594'],
77 ['iso' => 'PF','name' => 'French Polynesia','dialing_code' => '689'],
78 ['iso' => 'TF','name' => 'French Southern Territories','dialing_code' => '0'],
79 ['iso' => 'GA','name' => 'Gabon','dialing_code' => '241'],
80 ['iso' => 'GM','name' => 'Gambia','dialing_code' => '220'],
81 ['iso' => 'GE','name' => 'Georgia','dialing_code' => '995'],
82 ['iso' => 'DE','name' => 'Germany','dialing_code' => '49'],
83 ['iso' => 'GH','name' => 'Ghana','dialing_code' => '233'],
84 ['iso' => 'GI','name' => 'Gibraltar','dialing_code' => '350'],
85 ['iso' => 'GR','name' => 'Greece','dialing_code' => '30'],
86 ['iso' => 'GL','name' => 'Greenland','dialing_code' => '299'],
87 ['iso' => 'GD','name' => 'Grenada','dialing_code' => '1473'],
88 ['iso' => 'GP','name' => 'Guadeloupe','dialing_code' => '590'],
89 ['iso' => 'GU','name' => 'Guam','dialing_code' => '1671'],
90 ['iso' => 'GT','name' => 'Guatemala','dialing_code' => '502'],
91 ['iso' => 'GN','name' => 'Guinea','dialing_code' => '224'],
92 ['iso' => 'GW','name' => 'Guinea-Bissau','dialing_code' => '245'],
93 ['iso' => 'GY','name' => 'Guyana','dialing_code' => '592'],
94 ['iso' => 'HT','name' => 'Haiti','dialing_code' => '509'],
95 ['iso' => 'HM','name' => 'Heard Island and Mcdonald Islands','dialing_code' => '0'],
96 ['iso' => 'VA','name' => 'Holy See (Vatican City State)','dialing_code' => '39'],
97 ['iso' => 'HN','name' => 'Honduras','dialing_code' => '504'],
98 ['iso' => 'HK','name' => 'Hong Kong','dialing_code' => '852'],
99 ['iso' => 'HU','name' => 'Hungary','dialing_code' => '36'],
100 ['iso' => 'IS','name' => 'Iceland','dialing_code' => '354'],
101 ['iso' => 'IN','name' => 'India','dialing_code' => '91'],
102 ['iso' => 'ID','name' => 'Indonesia','dialing_code' => '62'],
103 ['iso' => 'IR','name' => 'Iran, Islamic Republic of','dialing_code' => '98'],
104 ['iso' => 'IQ','name' => 'Iraq','dialing_code' => '964'],
105 ['iso' => 'IE','name' => 'Ireland','dialing_code' => '353'],
106 ['iso' => 'IL','name' => 'Israel','dialing_code' => '972'],
107 ['iso' => 'IT','name' => 'Italy','dialing_code' => '39'],
108 ['iso' => 'JM','name' => 'Jamaica','dialing_code' => '1876'],
109 ['iso' => 'JP','name' => 'Japan','dialing_code' => '81'],
110 ['iso' => 'JO','name' => 'Jordan','dialing_code' => '962'],
111 ['iso' => 'KZ','name' => 'Kazakhstan','dialing_code' => '7'],
112 ['iso' => 'KE','name' => 'Kenya','dialing_code' => '254'],
113 ['iso' => 'KI','name' => 'Kiribati','dialing_code' => '686'],
114 ['iso' => 'KP','name' => 'Korea, Democratic People\'s Republic of','dialing_code' => '850'],
115 ['iso' => 'KR','name' => 'Korea, Republic of','dialing_code' => '82'],
116 ['iso' => 'KW','name' => 'Kuwait','dialing_code' => '965'],
117 ['iso' => 'KG','name' => 'Kyrgyzstan','dialing_code' => '996'],
118 ['iso' => 'LA','name' => 'Lao People\'s Democratic Republic','dialing_code' => '856'],
119 ['iso' => 'LV','name' => 'Latvia','dialing_code' => '371'],
120 ['iso' => 'LB','name' => 'Lebanon','dialing_code' => '961'],
121 ['iso' => 'LS','name' => 'Lesotho','dialing_code' => '266'],
122 ['iso' => 'LR','name' => 'Liberia','dialing_code' => '231'],
123 ['iso' => 'LY','name' => 'Libyan Arab Jamahiriya','dialing_code' => '218'],
124 ['iso' => 'LI','name' => 'Liechtenstein','dialing_code' => '423'],
125 ['iso' => 'LT','name' => 'Lithuania','dialing_code' => '370'],
126 ['iso' => 'LU','name' => 'Luxembourg','dialing_code' => '352'],
127 ['iso' => 'MO','name' => 'Macao','dialing_code' => '853'],
128 ['iso' => 'MK','name' => 'Macedonia, the Former Yugoslav Republic of','dialing_code' => '389'],
129 ['iso' => 'MG','name' => 'Madagascar','dialing_code' => '261'],
130 ['iso' => 'MW','name' => 'Malawi','dialing_code' => '265'],
131 ['iso' => 'MY','name' => 'Malaysia','dialing_code' => '60'],
132 ['iso' => 'MV','name' => 'Maldives','dialing_code' => '960'],
133 ['iso' => 'ML','name' => 'Mali','dialing_code' => '223'],
134 ['iso' => 'MT','name' => 'Malta','dialing_code' => '356'],
135 ['iso' => 'MH','name' => 'Marshall Islands','dialing_code' => '692'],
136 ['iso' => 'MQ','name' => 'Martinique','dialing_code' => '596'],
137 ['iso' => 'MR','name' => 'Mauritania','dialing_code' => '222'],
138 ['iso' => 'MU','name' => 'Mauritius','dialing_code' => '230'],
139 ['iso' => 'YT','name' => 'Mayotte','dialing_code' => '269'],
140 ['iso' => 'MX','name' => 'Mexico','dialing_code' => '52'],
141 ['iso' => 'FM','name' => 'Micronesia, Federated States of','dialing_code' => '691'],
142 ['iso' => 'MD','name' => 'Moldova, Republic of','dialing_code' => '373'],
143 ['iso' => 'MC','name' => 'Monaco','dialing_code' => '377'],
144 ['iso' => 'MN','name' => 'Mongolia','dialing_code' => '976'],
145 ['iso' => 'MS','name' => 'Montserrat','dialing_code' => '1664'],
146 ['iso' => 'MA','name' => 'Morocco','dialing_code' => '212'],
147 ['iso' => 'MZ','name' => 'Mozambique','dialing_code' => '258'],
148 ['iso' => 'MM','name' => 'Myanmar','dialing_code' => '95'],
149 ['iso' => 'NA','name' => 'Namibia','dialing_code' => '264'],
150 ['iso' => 'NR','name' => 'Nauru','dialing_code' => '674'],
151 ['iso' => 'NP','name' => 'Nepal','dialing_code' => '977'],
152 ['iso' => 'NL','name' => 'Netherlands','dialing_code' => '31'],
153 ['iso' => 'AN','name' => 'Netherlands Antilles','dialing_code' => '599'],
154 ['iso' => 'NC','name' => 'New Caledonia','dialing_code' => '687'],
155 ['iso' => 'NZ','name' => 'New Zealand','dialing_code' => '64'],
156 ['iso' => 'NI','name' => 'Nicaragua','dialing_code' => '505'],
157 ['iso' => 'NE','name' => 'Niger','dialing_code' => '227'],
158 ['iso' => 'NG','name' => 'Nigeria','dialing_code' => '234'],
159 ['iso' => 'NU','name' => 'Niue','dialing_code' => '683'],
160 ['iso' => 'NF','name' => 'Norfolk Island','dialing_code' => '672'],
161 ['iso' => 'MP','name' => 'Northern Mariana Islands','dialing_code' => '1670'],
162 ['iso' => 'NO','name' => 'Norway','dialing_code' => '47'],
163 ['iso' => 'OM','name' => 'Oman','dialing_code' => '968'],
164 ['iso' => 'PK','name' => 'Pakistan','dialing_code' => '92'],
165 ['iso' => 'PW','name' => 'Palau','dialing_code' => '680'],
166 ['iso' => 'PS','name' => 'Palestinian Territory, Occupied','dialing_code' => '970'],
167 ['iso' => 'PA','name' => 'Panama','dialing_code' => '507'],
168 ['iso' => 'PG','name' => 'Papua New Guinea','dialing_code' => '675'],
169 ['iso' => 'PY','name' => 'Paraguay','dialing_code' => '595'],
170 ['iso' => 'PE','name' => 'Peru','dialing_code' => '51'],
171 ['iso' => 'PH','name' => 'Philippines','dialing_code' => '63'],
172 ['iso' => 'PN','name' => 'Pitcairn','dialing_code' => '0'],
173 ['iso' => 'PL','name' => 'Poland','dialing_code' => '48'],
174 ['iso' => 'PT','name' => 'Portugal','dialing_code' => '351'],
175 ['iso' => 'PR','name' => 'Puerto Rico','dialing_code' => '1787'],
176 ['iso' => 'QA','name' => 'Qatar','dialing_code' => '974'],
177 ['iso' => 'RE','name' => 'Reunion','dialing_code' => '262'],
178 ['iso' => 'RO','name' => 'Romania','dialing_code' => '40'],
179 ['iso' => 'RU','name' => 'Russian Federation','dialing_code' => '70'],
180 ['iso' => 'RW','name' => 'Rwanda','dialing_code' => '250'],
181 ['iso' => 'SH','name' => 'Saint Helena','dialing_code' => '290'],
182 ['iso' => 'KN','name' => 'Saint Kitts and Nevis','dialing_code' => '1869'],
183 ['iso' => 'LC','name' => 'Saint Lucia','dialing_code' => '1758'],
184 ['iso' => 'PM','name' => 'Saint Pierre and Miquelon','dialing_code' => '508'],
185 ['iso' => 'VC','name' => 'Saint Vincent and the Grenadines','dialing_code' => '1784'],
186 ['iso' => 'WS','name' => 'Samoa','dialing_code' => '684'],
187 ['iso' => 'SM','name' => 'San Marino','dialing_code' => '378'],
188 ['iso' => 'ST','name' => 'Sao Tome and Principe','dialing_code' => '239'],
189 ['iso' => 'SA','name' => 'Saudi Arabia','dialing_code' => '966'],
190 ['iso' => 'SN','name' => 'Senegal','dialing_code' => '221'],
191 ['iso' => 'CS','name' => 'Serbia and Montenegro','dialing_code' => '381'],
192 ['iso' => 'SC','name' => 'Seychelles','dialing_code' => '248'],
193 ['iso' => 'SL','name' => 'Sierra Leone','dialing_code' => '232'],
194 ['iso' => 'SG','name' => 'Singapore','dialing_code' => '65'],
195 ['iso' => 'SK','name' => 'Slovakia','dialing_code' => '421'],
196 ['iso' => 'SI','name' => 'Slovenia','dialing_code' => '386'],
197 ['iso' => 'SB','name' => 'Solomon Islands','dialing_code' => '677'],
198 ['iso' => 'SO','name' => 'Somalia','dialing_code' => '252'],
199 ['iso' => 'ZA','name' => 'South Africa','dialing_code' => '27'],
200 ['iso' => 'GS','name' => 'South Georgia and the South Sandwich Islands','dialing_code' => '0'],
201 ['iso' => 'ES','name' => 'Spain','dialing_code' => '34'],
202 ['iso' => 'LK','name' => 'Sri Lanka','dialing_code' => '94'],
203 ['iso' => 'SD','name' => 'Sudan','dialing_code' => '249'],
204 ['iso' => 'SR','name' => 'Suriname','dialing_code' => '597'],
205 ['iso' => 'SJ','name' => 'Svalbard and Jan Mayen','dialing_code' => '47'],
206 ['iso' => 'SZ','name' => 'Swaziland','dialing_code' => '268'],
207 ['iso' => 'SE','name' => 'Sweden','dialing_code' => '46'],
208 ['iso' => 'CH','name' => 'Switzerland','dialing_code' => '41'],
209 ['iso' => 'SY','name' => 'Syrian Arab Republic','dialing_code' => '963'],
210 ['iso' => 'TW','name' => 'Taiwan, Province of China','dialing_code' => '886'],
211 ['iso' => 'TJ','name' => 'Tajikistan','dialing_code' => '992'],
212 ['iso' => 'TZ','name' => 'Tanzania, United Republic of','dialing_code' => '255'],
213 ['iso' => 'TH','name' => 'Thailand','dialing_code' => '66'],
214 ['iso' => 'TL','name' => 'Timor-Leste','dialing_code' => '670'],
215 ['iso' => 'TG','name' => 'Togo','dialing_code' => '228'],
216 ['iso' => 'TK','name' => 'Tokelau','dialing_code' => '690'],
217 ['iso' => 'TO','name' => 'Tonga','dialing_code' => '676'],
218 ['iso' => 'TT','name' => 'Trinidad and Tobago','dialing_code' => '1868'],
219 ['iso' => 'TN','name' => 'Tunisia','dialing_code' => '216'],
220 ['iso' => 'TR','name' => 'Turkey','dialing_code' => '90'],
221 ['iso' => 'TM','name' => 'Turkmenistan','dialing_code' => '7370'],
222 ['iso' => 'TC','name' => 'Turks and Caicos Islands','dialing_code' => '1649'],
223 ['iso' => 'TV','name' => 'Tuvalu','dialing_code' => '688'],
224 ['iso' => 'UG','name' => 'Uganda','dialing_code' => '256'],
225 ['iso' => 'UA','name' => 'Ukraine','dialing_code' => '380'],
226 ['iso' => 'AE','name' => 'United Arab Emirates','dialing_code' => '971'],
227 ['iso' => 'GB','name' => 'United Kingdom','dialing_code' => '44'],
228 ['iso' => 'US','name' => 'United States','dialing_code' => '1'],
229 ['iso' => 'UM','name' => 'United States Minor Outlying Islands','dialing_code' => '1'],
230 ['iso' => 'UY','name' => 'Uruguay','dialing_code' => '598'],
231 ['iso' => 'UZ','name' => 'Uzbekistan','dialing_code' => '998'],
232 ['iso' => 'VU','name' => 'Vanuatu','dialing_code' => '678'],
233 ['iso' => 'VE','name' => 'Venezuela','dialing_code' => '58'],
234 ['iso' => 'VN','name' => 'Viet Nam','dialing_code' => '84'],
235 ['iso' => 'VG','name' => 'Virgin Islands, British','dialing_code' => '1284'],
236 ['iso' => 'VI','name' => 'Virgin Islands, U.s.','dialing_code' => '1340'],
237 ['iso' => 'WF','name' => 'Wallis and Futuna','dialing_code' => '681'],
238 ['iso' => 'EH','name' => 'Western Sahara','dialing_code' => '212'],
239 ['iso' => 'YE','name' => 'Yemen','dialing_code' => '967'],
240 ['iso' => 'ZM','name' => 'Zambia','dialing_code' => '260'],
241 ['iso' => 'ZW','name' => 'Zimbabwe','dialing_code' => '263'],
242 ['iso' => 'RS','name' => 'Serbia','dialing_code' => '381'],
243 ['iso' => 'AP','name' => 'Asia / Pacific Region','dialing_code' => '0'],
244 ['iso' => 'ME','name' => 'Montenegro','dialing_code' => '382'],
245 ['iso' => 'AX','name' => 'Aland Islands','dialing_code' => '358'],
246 ['iso' => 'BQ','name' => 'Bonaire, Sint Eustatius and Saba','dialing_code' => '599'],
247 ['iso' => 'CW','name' => 'Curacao','dialing_code' => '599'],
248 ['iso' => 'GG','name' => 'Guernsey','dialing_code' => '44'],
249 ['iso' => 'IM','name' => 'Isle of Man','dialing_code' => '44'],
250 ['iso' => 'JE','name' => 'Jersey','dialing_code' => '44'],
251 ['iso' => 'XK','name' => 'Kosovo','dialing_code' => '381'],
252 ['iso' => 'BL','name' => 'Saint Barthelemy','dialing_code' => '590'],
253 ['iso' => 'MF','name' => 'Saint Martin','dialing_code' => '590'],
254 ['iso' => 'SX','name' => 'Sint Maarten','dialing_code' => '1'],
255 ['iso' => 'SS','name' => 'South Sudan','dialing_code' => '211']
256 ];
  • 0
Joshua

Hi guys! For anyone struggling with Stripe integration (as it has recently changed due to a new regulation called Strong Customer Authentication (SCA)), you can read a migration guide here: https://stripe.com/docs/payments/checkout/migration

Thanks!

  • 1
fred

In case anyone is wondering, I was able to update to Cashier v9 on Laravel 5.8 and so far haven't run into any problems. I would say updating to Cashier v9 is pretty much mandatory. There is no longer any documentation for v7 that I could easily find, no upgrade guides, no nothing. If you try ask a question on github the developers just say they don't test or support v7 anymore.

  • 0
fred

To make this more of a complete Spark replacement you will most likely want to add invoices. How to do that is discussed in the course called laravel subscriptions. That course uses braintree but the invoicing code discussed there seems to also work with stripe. All the code you need to add is discussed in video #11 of that course. I am beginner to intermediate on PHP/Laravel and I didn't find it too difficult to add it.

  • 1
fred

I seem to have this working on Laravel 5.8 and Bootstrap 4.

To update Laravel to Bootstrap 4, follow the Laravel guides you will find by doing a google search. After that you have to go through all the blade templates and make the following changes.

Change/add/remove all occurrences of any of the following classes.

1<nav class="navbar navbar-default navbar-static-top">
2<button class="navbar-toggle">
3<ul class="nav navbar-nav navbar-right">
4<ul class="nav nav-pills nav-stacked">
5<div class="panel panel-default">
6 <div class="panel-heading">
7 <div class="panel-body">
8 <div class="form-group">
9 <label class="control-label">
10 <ul>
11 <li>
12 <a>

To

1<nav class="navbar navbar-expand-md navbar-light sticky-top">
2<button class="navbar-toggler">
3<ul class="nav navbar-nav ml-auto">
4<ul class="nav nav-pills flex-column">
5<div class="card">
6 <div class="card-header">
7 <div class="card-body">
8 <div class="row form-group">
9 <label class="col-form-label text-md-right">
10 <ul>
11 <li class="nav-item">
12 <a class="nav-link">

And

1Change any occurrences of `col-md-offset-*` to `offset-md-*`.

Form validation still sort of works but probably needs to be changed. To change all that you can set up fresh laravel 5.8 and php artisan make:auth and compare how it sets up templates.

To change replace the following example

1<div class="row form-group{{ $errors->has('email') ? ' has-error' : '' }}">
2 <label for="email" class="col-md-4 col-form-label text-md-right">E-Mail Address</label>
3
4 <div class="col-md-6">
5 <input id="email" type="email" class="form-control"
6 name="email" value="{{ old('email') }}" required autofocus>
7
8 @if ($errors->has('email'))
9 <span class="help-block">
10 <strong>{{ $errors->first('email') }}</strong>
11 </span>
12 @endif
13 </div>
14 </div>

With

1<div class="row form-group">
2 <label for="email" class="col-md-4 col-form-label text-md-right">E-Mail Address</label>
3
4 <div class="col-md-6">
5 <input id="email" type="email"
6 class="form-control{{ $errors->has('email') ? ' is-invalid' : '' }}"
7 name="email" value="{{ old('email') }}" required autofocus>
8
9 @if ($errors->has('email'))
10 <span class="invalid-feedback">
11 <strong>{{ $errors->first('email') }}</strong>
12 </span>
13 @endif
14 </div>
15 </div>
  • 1
Christian

These changes is irrelevant. This course is not about layout and bootstrap 4, and people most likely use another solutions over the standard laravel layout :-)

  • 0
fred

I don't understand what you mean Christian. Bootstrap blade templates are integral to this course. It's not optional.

  • 0
Israel

I'm using the latest version of Laravel. I keep getting this error. How could I fix this? General error: 1215 Cannot add foreign key constraint (SQL: alter table confirmation_tokens add constraint confirmation_tokens_user_id_foreign foreign key (user_id) references users (id) on delete cascade)

  • 0
Christian

Hi Israel,

Change: $table->integer('user_id')->unsigned()->index();

To: $table->bigInteger('user_id')->unsigned()->index();

  • 0
Israel

Thank you! It worked.

  • 0
Marc

At part 27. Team billing: Piggybacking subscriptions My (local) webserver/php hangs in some kind of infinite loop using the 2 trait HasSubscriptions methods;

1public function hasSubscription() {
2 if ($this->hasPiggybackSubscription()) {
3 return true;
4 }
5 return $this->subscribed('main');
6}
7
8public function hasPiggybackSubscription() {
9 foreach($this->teams as $team) {
10 if ($team->owner->hasSubscription()) {
11 return true;
12 }
13 }
14 return false;
15}

My solution was to change the line; if ($team->owner->hasSubscription()) { to; if (!$this->team && $team->owner->subscribed('main')) {

Resulting in no more hanging of my (local) webserver.

  • 2
Marcel

Hi, great series, learned a lot from this one! I do run into an error and I cannot seem to solve it. This is the error:

Symfony \ Component \ Debug \ Exception \ FatalThrowableError (E_ERROR) Call to a member function hasSubscription() on null

app\Http\Middleware\Subscription\RedirectIfNotInactive.php

1public function handle($request, Closure $next)
2{
3 if (auth()->user()->hasSubscription()) {
4 return redirect()->route('account.index');

I get this when I'm not logged in and click the Plans links on the navigation. There is one registered user with an active subscription, but as said he's logged out.

I'm pretty sure it's something simple but I'm lost right now. Any ideas? Thanks!

  • 0
Hani

Hi

check if user logged or not.

1if (auth()->check() && auth()->user()->hasSubscription()) {
2 return redirect()->route('account.index');
3}
  • 0
Lykourgos

Not sure if anyone tried this, but tried Mail::to($request->user())->send(new PasswordUpdated($request->user()));

and set $this->user = $user in the PasswordUpdated::__construct() in order to output {{ $user->name }} in the email template, but its throwing an exception on failed-queues: ErrorException: Undefined variable: user

  • 0
Alexander

Quick correction. To get the e-mails to get queued, use queue() instead of send(): Mail::to($request->user())->send(new PasswordUpdated()); Should be: Mail::to($request->user())->queue(new PasswordUpdated());

  • 0
Oscar

Question, how do you put the namespace automatically using Sublime 3 in Mac? Thanks for answer

  • 0
David

You can use this package https://github.com/erichard/SublimePHPCompanion

  • 0
Oscar

I think with F10 would do it.

  • 0
Oscar

Hi, could you please provide me the full code of project? "Full course code" no work. Thanks a lot!

  • 0
DUIWEBOER

Maybe make sure popup blocker is turned of for the site, since the "Full Course Code" is a popup?

  • 0
Rich

missing parent::boot(); in App\Models\ConfirmationToken boot() method

  • 7
Mrs_M

Thanks! Your comment saved me :)

  • 0
Devon

Thanks for this!

  • 0
Oscar

Thank you so much!

  • 0
Andrew

Brilliant, thank you for this comment

  • 0
Waldemar

Thank you very much!

  • 0
Cristian

Yeah me too! Many thanks mate!

  • 0
Michael

thanks saved me too

  • 0
kabelo

Does adding activated to the create array not get ignored anyway because it's not in the fillable array?

Video 09 (at around 1:15)

  • 0
Ash

Anyone else getting this error on migrate refresh?

1➜ php artisan migrate:refresh
2
3In Connection.php line 664:
4
5 SQLSTATE[23000]: Integrity constraint violation: 1217 Cannot delete or update a parent row: a foreign key constraint fails (SQL: drop table if e
6 xists `users`)
7
8
9In Connection.php line 458:
10
11 SQLSTATE[23000]: Integrity constraint violation: 1217 Cannot delete or update a parent row: a foreign key constraint fails
  • 0
Andres

What you are getting is basically, is due to dropping a table that has a foreign key referencing another table in this case users. Possibly this has to do with the order in which they are dropped due to the order of your migrations, can you send paste the order in of your migrations in the folder, they are normally executed in alphabetical order, which is normally determined by the date prefix they have, check is Users table first, and then you have the password_resets, jobs, confirmation_tokens...

There are other workaround such as remove the Foreign key checks, but you normally want to try the other way of sorting it out.

1public function down()
2{
3 DB::statement('SET FOREIGN_KEY_CHECKS = 0');
4 Schema::drop('tableName');
5 DB::statement('SET FOREIGN_KEY_CHECKS = 1');
6}
  • 0
Mehrad

This is one of the best Laravel courses that I've ever seen. I canceled my Laracast membership after finding this. Practically, I learned how to make Laravel Spark for my self for free and because I've been walked through the whole process, I know exactly where things are which was one of my issues with Spark.

Question: Can you help me to change the subscription type instead of just users to the number of users as well as the number of devices (for example) from another CRUD?

Also, how to add roles to this boilerplate?

  • 6
fred

There is no invoicing done in this procedure like Spark. It's an important missing piece imo.

  • 0
MdMorshadun

Hi, The 2nd lecture isn't responding.

  • 0
Alex

Sorry about that. This has been resolved.

  • 0
Simon

Hi Alex,

When dealing with the queues etc what extra stuff you need to do to ensure these are run automatically? Locally and on the live server?

  • 0
Miroslav

The download link to "02: Laravel, queues and mail" does not work.

  • 0
Alex

Thanks for letting me know. This has now been fixed.

  • 0
Colyn

A lot of the work you did around teams is too much complexity for my taste. I came up with a different solution. Instead of subscriptions being attached to users, subscriptions could be attached to Teams. The main change is using the Billable trait on the Team model instead of the User model. Once you do that, it all just sort of falls into place naturally.

  • 0
Alex

That's certainly another way to do it. Would you not then have to:

  1. Manage permissions for who 'owns' the team, and therefore who can edit the subscription and;
  2. Create a team even for normal users who are not part of a team.

Like most things, I guess both ways have their tradeoffs?

  • 0
Taylor

This and Nuxt.js would be the ultimate love child <3

  • 0
Alex

Hey Taylor! Up for doing a course on this.

p.s. as a pro member, you'll have access to the codecourse.com source (Laravel/Nuxt.js), so you can have a browse through and implement what you need from it.

  • 0
Manuel

Ey Alex, awesome? Where I can find this?

  • 0
Romany

Great Series , I have learned too much here. just a missed semicolon on line 70 at the JavaScript code

  • 0
Alex

Glad you learned a lot :)

  • 0
Colyn

Very impressive redesign, Alex. Also thank you for the new inline comments. Way better!

  • 0
Alex

Cheers! I agree.

  • 0
Alexander

Great series!

  • 1
Alex

Thanks Alexander.

p.s. great name 👍

  • 0
Oscar

New homepage! really nice! :) greetings from Switzerland!

  • 0
Mohammad-Karim

It is really nice, much faster and looking awesome. The only issue I notice is when clicking on a lesson, then you would have to scroll up the page to view the video. M K Dinarkhail

  • 0
Alex

Thanks Oscar!

@Mohammad, as per your suggestion, this now scrolls. Thanks for the valuable feedback.

  • 0