xbtdev
u/xbtdev
What's the longest stream of vowel sounds you've encountered in your learning so far?
I recently came across this sentence, which made me realise we don't get that so much in English:
Va a ir a un museo.
SOLVED: Tiny typo from typing out code manually, looked like a way bigger problem than it actually was. I'll leave this here to see if anyone can see the typo and note what a dummy I've been...
...actually, in the interest in helping newbies: I typed __constructor instead of __construct
I had been trying to achieve this with a completely seperate middleware class, but recently decided since my middleware is tiny, to just use a closure (pasted below). However, I can't seem to get access to this $site data in any of the other controller functions.
class ManageController extends Controller
{
private $site = 6;
public function __constructor()
Where can I find detailed information on this 'with' function? This seems to be basically the extent of coverage in Laravel's documentation (under redirects):
return redirect('dashboard')->with('status', 'Profile updated!');
https://laravel.com/docs/5.3/responses#redirecting-with-flashed-session-data
It's obviously a really inconvenient function name for Googling.
Edit: Nevermind, I found the source:
/**
* Flash a piece of data to the session.
*
* @param string|array $key
* @param mixed $value
* @return \Illuminate\Http\RedirectResponse
*/
public function with($key, $value = null)
{
$key = is_array($key) ? $key : [$key =
This has no doubt already been thought of and programmed by someone else, but after more than an hour of searching for it with no luck, I finally just decided to write it myself:
public static function property_path_exists($object, $property_path)
{
$path_components = explode('->', $property_path);
if (count($path_components) == 1) {
return property_exists($object, $property_path);
} else {
return (
property_exists($object, $path_components[0]) &&
static::property_path_exists(
$object->{array_shift($path_components)},
implode('->', $path_components)
)
);
}
}
Usage:
if (prope
If you thought searching for English language torrents was a minefield of scams and fake links, searching for Spanish language torrents is 100x worse.
I'd settle for something with a good audio stream even if the video is poor - I can mux with video from an English copy.
Update: found
I hadn't thought about this before, but with hindsight it may be obvious - when I changed Windows to Spanish, some keyboard shortcuts that I was so used to also changed.
For example, for decades I've always been able to hit Ctrl-S to save some text in notepad. But now that my OS is in Spanish, I have to get used to hitting Ctrl-G for guardar.
It's not a dealbreaker, I'll keep my OS in Spanish and get used to the differing shortcuts, but I must say - these shortcuts have been a lot harder to get used to than just reading different menus, etc.
"If everything was left to the market, there would be no water, no working conditions, no food." - i.e. Without government, we would all die of thirst or hunger.
np.reddit.com/r/australia/comments/50jt2s/aus...In Laravel 5.2 we can change the default field that gets used by the auth functions for login/register, by adding this line to AuthController.php:
protected $username = 'username';
Laravel 5.3 however, does away with AuthController in favour of two separate ones:
- LoginController.php
- RegisterController.php
So, in order to switch the default login field from 'email' to 'username', do we have to add that line of code to both of these?
Anyone done a min-tutorial on this issue yet?
Edit After digging around Laravel's source, I found this in vendor/laravel/framework/src/Illuminate/Foundation/Auth/AuthenticatesUsers.php:
/**
* Get the login username to be used
I'm having this same issue that people were having back in 2015:
https://github.com/qbittorrent/qBittorrent/issues/3357
Last reply there is from last December though. Are there any more recent discussions about the issue?
Is there a way to zero out all session-related stats, without actually exiting the program and re-launching it?
I don't have a github account, but I see the latest 5.3 is still using the incorrect form of 'Log In'.
- Log In <-- this is a verb (e.g. Please log in / Log in here )
- Login <-- this is a noun or an adjective. (e.g. Enter your login. / What's your login ID?)
The menu item should use the verb. The header on the login page should use the verb. The button on the login page should use the verb. The fact that this error is in a popular framework is especially annoying because it means thousands upon thousands of new sites will probably also have the error (just like reddit does on one of its login buttons).
I have an API (built in Laravel 5.2) which I'm trying to adhere as much as possible to standard verbs. As such, the following allows a user to get one of his messages, or retrieve all of his messages:
Route::get('messages/{id}', 'APIController@get_message');
Route::get('messages', 'APIController@get_messages');
My problem is, there are other types of users, which have admin privileges. This means they will not only be able to see ANY individual message, but 'all' should mean for EVERY user:
Route::group(['middleware' => 'App\Http\Middleware\AdminOnly:api'], function(
{
Route::get('messages/{id}', 'APIController@get_message');
Route::get('messages', 'APIC
